mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -07:00
Fix service checking for autostart and add fallback error
This commit is contained in:
parent
6c18a2b147
commit
d2ccacb3e4
1 changed files with 7 additions and 2 deletions
|
@ -519,10 +519,15 @@ if [ "${AUTOSTART}" = "yes" ]; then
|
||||||
echo "The AUTOSTART [-s] option may not be needed on your distribution." >&2
|
echo "The AUTOSTART [-s] option may not be needed on your distribution." >&2
|
||||||
fi
|
fi
|
||||||
# Check for systemd
|
# Check for systemd
|
||||||
if ! hash systemctl 2>/dev/null; then
|
if hash systemctl 2>/dev/null; then
|
||||||
systemctl start plexmediaserver.service
|
systemctl start plexmediaserver.service
|
||||||
|
elif hash service 2>/dev/null; then
|
||||||
|
service plexmediaserver start
|
||||||
|
elif [ -x /etc/init.d/plexmediaserver ]; then
|
||||||
|
/etc/init.d/plexmediaserver start
|
||||||
else
|
else
|
||||||
/sbin/service plexmediaserver start
|
echo "ERROR: AUTOSTART was specified but no startup scripts were found for 'plexmediaserver'." >&2
|
||||||
|
cronexit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue