aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2020-11-22 17:12:29 -0500
committerJoshua M. Boniface <joshua@boniface.me>2020-11-22 17:12:29 -0500
commit1079ddb46cceea1af45d5e00cdaa4b92e2a306f1 (patch)
tree74cc297d7aefbc61e13da5b8d6c7c40b5364f685 /debian
parent3442dbbaf96f98f3106afba3d98be169ff63fd97 (diff)
Run explicit service start if restart failed
Should solve the occasional bugs with the restart in the WebUI. Sometimes the service stops and then doesn't start again; this will run an explicit start action afterwards. If this doesn't fix it I'm certain there would be more tweaking that can be done.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/bin/restart.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/debian/bin/restart.sh b/debian/bin/restart.sh
index 9b64b6d72..e499bf336 100755
--- a/debian/bin/restart.sh
+++ b/debian/bin/restart.sh
@@ -24,13 +24,13 @@ 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 $( which systemctl ) restart jellyfin" | at now
+ echo "sleep 2; /usr/bin/sudo $( which systemctl ) restart jellyfin || /usr/bin/sudo $( which systemctl ) start jellyfin" | at now
;;
'service')
- echo "sleep 2; /usr/bin/sudo $( which service ) jellyfin restart" | at now
+ echo "sleep 2; /usr/bin/sudo $( which service ) jellyfin restart || /usr/bin/sudo $( which service ) jellyfin start" | at now
;;
'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 || /usr/bin/sudo /etc/init.d/jellyfin start" | at now
;;
esac
exit 0