Merge pull request #4554 from joshuaboniface/fix-restart

Run explicit service start if restart failed
pull/4570/head
Bill Thornton 4 years ago committed by GitHub
commit 4f96e2f256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 0.5; /usr/bin/sudo $( which systemctl ) start jellyfin" | at now
;;
'service')
echo "sleep 2; /usr/bin/sudo $( which service ) jellyfin restart" | at now
echo "sleep 0.5; /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 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now
;;
esac
exit 0

@ -40,7 +40,7 @@ Jellyfin is a free software media system that puts you in control of managing an
Summary: The Free Software Media System Server backend
Requires(pre): shadow-utils
Requires: ffmpeg
Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
Requires: libcurl, fontconfig, freetype, openssl, glibc, libicu, at
%description server
The Jellyfin media server backend.

@ -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 0.5; /usr/bin/sudo $( which systemctl ) start jellyfin" | at now
;;
'service')
echo "sleep 2; /usr/bin/sudo $( which service ) jellyfin restart" | at now
echo "sleep 0.5; /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 0.5; /usr/bin/sudo /etc/init.d/jellyfin start" | at now
;;
esac
exit 0

Loading…
Cancel
Save