diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-06-28 11:15:08 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2019-06-28 11:15:08 -0400 |
| commit | 62105c249f59e4343a8db2ff6d2cb8af809745d5 (patch) | |
| tree | 9f773e2caba896205c1249146a27deeb8b6aab77 | |
| parent | a629f209b931e37a2e3e5db5ee9827460e5f3bbf (diff) | |
Use which to find the service binary path
| -rw-r--r-- | deployment/debian-package-x64/pkg-src/bin/restart.sh | 4 | ||||
| -rw-r--r-- | deployment/fedora-package-x64/pkg-src/restart.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/deployment/debian-package-x64/pkg-src/bin/restart.sh b/deployment/debian-package-x64/pkg-src/bin/restart.sh index 4c664d404..9b64b6d72 100644 --- a/deployment/debian-package-x64/pkg-src/bin/restart.sh +++ b/deployment/debian-package-x64/pkg-src/bin/restart.sh @@ -24,10 +24,10 @@ cmd="$( get_service_command )" echo "Detected service control platform '$cmd'; using it to restart Jellyfin..." case $cmd in 'systemctl') - echo "sleep 2; /usr/bin/sudo /usr/bin/systemctl restart jellyfin" | at now + echo "sleep 2; /usr/bin/sudo $( which systemctl ) restart jellyfin" | at now ;; 'service') - echo "sleep 2; /usr/bin/sudo /sbin/service jellyfin restart" | at now + echo "sleep 2; /usr/bin/sudo $( which service ) jellyfin restart" | at now ;; 'sysv') echo "sleep 2; /usr/bin/sudo /etc/init.d/jellyfin restart" | at now diff --git a/deployment/fedora-package-x64/pkg-src/restart.sh b/deployment/fedora-package-x64/pkg-src/restart.sh index 4c664d404..9b64b6d72 100644 --- a/deployment/fedora-package-x64/pkg-src/restart.sh +++ b/deployment/fedora-package-x64/pkg-src/restart.sh @@ -24,10 +24,10 @@ cmd="$( get_service_command )" echo "Detected service control platform '$cmd'; using it to restart Jellyfin..." case $cmd in 'systemctl') - echo "sleep 2; /usr/bin/sudo /usr/bin/systemctl restart jellyfin" | at now + echo "sleep 2; /usr/bin/sudo $( which systemctl ) restart jellyfin" | at now ;; 'service') - echo "sleep 2; /usr/bin/sudo /sbin/service jellyfin restart" | at now + echo "sleep 2; /usr/bin/sudo $( which service ) jellyfin restart" | at now ;; 'sysv') echo "sleep 2; /usr/bin/sudo /etc/init.d/jellyfin restart" | at now |
