aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/bin/restart.sh3
-rw-r--r--debian/conf/jellyfin-sudoers6
2 files changed, 5 insertions, 4 deletions
diff --git a/debian/bin/restart.sh b/debian/bin/restart.sh
index 6aea24ee4..be5ca2c8b 100755
--- a/debian/bin/restart.sh
+++ b/debian/bin/restart.sh
@@ -43,7 +43,8 @@ fi
echo "Detected service control platform '$cmd'; using it to restart Jellyfin..."
case $cmd in
'systemctl')
- echo "sleep 0.5; $sudo_command systemctl start jellyfin" | at now
+ # Without systemd-run here, `jellyfin.service`'s shutdown terminates this process too
+ $sudo_command systemd-run --scope systemctl restart jellyfin
;;
'service')
echo "sleep 0.5; $sudo_command service jellyfin start" | at now
diff --git a/debian/conf/jellyfin-sudoers b/debian/conf/jellyfin-sudoers
index b481ba4ad..01e90322b 100644
--- a/debian/conf/jellyfin-sudoers
+++ b/debian/conf/jellyfin-sudoers
@@ -2,9 +2,9 @@
Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service jellyfin restart, /usr/sbin/service jellyfin restart
Cmnd_Alias STARTSERVER_SYSV = /sbin/service jellyfin start, /usr/sbin/service jellyfin start
Cmnd_Alias STOPSERVER_SYSV = /sbin/service jellyfin stop, /usr/sbin/service jellyfin stop
-Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemctl restart jellyfin, /bin/systemctl restart jellyfin
-Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start jellyfin, /bin/systemctl start jellyfin
-Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop jellyfin, /bin/systemctl stop jellyfin
+Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemd-run --scope systemctl restart jellyfin
+Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemd-run --scope systemctl start jellyfin
+Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemd-run --scope systemctl stop jellyfin
Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/jellyfin restart
Cmnd_Alias STARTSERVER_INITD = /etc/init.d/jellyfin start
Cmnd_Alias STOPSERVER_INITD = /etc/init.d/jellyfin stop