Merge pull request #4554 from joshuaboniface/fix-restart

Run explicit service start if restart failed
This commit is contained in:
Bill Thornton 2020-11-23 14:15:18 -05:00 committed by GitHub
commit 4f96e2f256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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