Sfoglia il codice sorgente

Use which to find the service binary path

Joshua M. Boniface 6 anni fa
parent
commit
62105c249f

+ 2 - 2
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..."
 echo "Detected service control platform '$cmd'; using it to restart Jellyfin..."
 case $cmd in
 case $cmd in
     'systemctl')
     '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')
     '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')
     'sysv')
         echo "sleep 2; /usr/bin/sudo /etc/init.d/jellyfin restart" | at now 
         echo "sleep 2; /usr/bin/sudo /etc/init.d/jellyfin restart" | at now 

+ 2 - 2
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..."
 echo "Detected service control platform '$cmd'; using it to restart Jellyfin..."
 case $cmd in
 case $cmd in
     'systemctl')
     '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')
     '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')
     'sysv')
         echo "sleep 2; /usr/bin/sudo /etc/init.d/jellyfin restart" | at now 
         echo "sleep 2; /usr/bin/sudo /etc/init.d/jellyfin restart" | at now