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.
This commit is contained in:
AJ Jordan 2020-11-29 03:47:18 -05:00
parent a4e1732e35
commit ce82932c9a
No known key found for this signature in database
GPG Key ID: 26794034633DBBC0
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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