فهرست منبع

Use which to find the service binary path

Joshua M. Boniface 6 سال پیش
والد
کامیت
62105c249f
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 2 2
      deployment/debian-package-x64/pkg-src/bin/restart.sh
  2. 2 2
      deployment/fedora-package-x64/pkg-src/restart.sh

+ 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..."
 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 

+ 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..."
 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