diff options
| author | AJ Jordan <alex@strugee.net> | 2020-12-04 16:08:49 -0800 |
|---|---|---|
| committer | AJ Jordan <alex@strugee.net> | 2020-12-04 16:33:24 -0800 |
| commit | bab389114b5833735d55d982ba1a2c17fd22e0d2 (patch) | |
| tree | f2a2795109689f8c6cd425193b76fafd550098a0 /debian/bin | |
| parent | d251c701b940fc1d7d1f29799785d4bc290b8ce6 (diff) | |
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`.
Diffstat (limited to 'debian/bin')
| -rwxr-xr-x | debian/bin/restart.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/bin/restart.sh b/debian/bin/restart.sh index be5ca2c8bd..4847b918be 100755 --- a/debian/bin/restart.sh +++ b/debian/bin/restart.sh @@ -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 |
