소스 검색

Remove useless which(1) calls in restart.sh

at(1) runs commandlines with /bin/sh anyway, which resolves paths. No
need to do it ourselves.
AJ Jordan 4 년 전
부모
커밋
ce82932c9a
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      debian/bin/restart.sh
  2. 2 2
      fedora/restart.sh

+ 2 - 2
debian/bin/restart.sh

@@ -37,10 +37,10 @@ fi
 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 0.5; /usr/bin/sudo $( which systemctl ) start jellyfin" | at now 
+        echo "sleep 0.5; /usr/bin/sudo systemctl start jellyfin" | at now 
         ;;
         ;;
     'service')
     'service')
-        echo "sleep 0.5; /usr/bin/sudo $( which service ) jellyfin start" | at now 
+        echo "sleep 0.5; /usr/bin/sudo service jellyfin start" | at now 
         ;;
         ;;
     'sysv')
     'sysv')
         echo "sleep 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now 
         echo "sleep 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now 

+ 2 - 2
fedora/restart.sh

@@ -37,10 +37,10 @@ fi
 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 0.5; /usr/bin/sudo $( which systemctl ) start jellyfin" | at now 
+        echo "sleep 0.5; /usr/bin/sudo systemctl start jellyfin" | at now 
         ;;
         ;;
     'service')
     'service')
-        echo "sleep 0.5; /usr/bin/sudo $( which service ) jellyfin start" | at now 
+        echo "sleep 0.5; /usr/bin/sudo service jellyfin start" | at now 
         ;;
         ;;
     'sysv')
     'sysv')
         echo "sleep 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now 
         echo "sleep 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now