mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 12:44:19 +01:00
Use a service unit, not a scope unit, to restart
Reportedly `systemd-run --scope` still got killed by the service manager; see #4615. The suspected cause is that `scope` units are run by the `systemd-run` process itself and inherit the caller's execution environment (see systemd-run(1)). To fix this, we use a systemd `service` unit instead, which is run and managed by PID 1 - hopefully this will isolate us sufficiently so that we don't get terminated along with `jellyfin.service`.
This commit is contained in:
2
debian/bin/restart.sh
vendored
2
debian/bin/restart.sh
vendored
@@ -44,7 +44,7 @@ echo "Detected service control platform '$cmd'; using it to restart Jellyfin..."
|
||||
case $cmd in
|
||||
'systemctl')
|
||||
# Without systemd-run here, `jellyfin.service`'s shutdown terminates this process too
|
||||
$sudo_command systemd-run --scope systemctl restart jellyfin
|
||||
$sudo_command systemd-run systemctl restart jellyfin
|
||||
;;
|
||||
'service')
|
||||
echo "sleep 0.5; $sudo_command service jellyfin start" | at now
|
||||
|
||||
Reference in New Issue
Block a user