mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -07:00
Add support for $SYSTEMDUNIT (#209)
Default SYSTEMDUNIT = plexmediaserver.service Can be overwritten with configuration file.
This commit is contained in:
parent
aad9934099
commit
551e664262
1 changed files with 2 additions and 1 deletions
|
@ -58,6 +58,7 @@ WGETOPTIONS="" # extra options for wget. Used for progress bar.
|
||||||
CHECKUPDATE=yes
|
CHECKUPDATE=yes
|
||||||
NOTIFY=no
|
NOTIFY=no
|
||||||
CHECKONLY=no
|
CHECKONLY=no
|
||||||
|
SYSTEMDUNIT=plexmediaserver.service
|
||||||
|
|
||||||
FILE_SHA=$(mktemp /tmp/plexupdate.sha.XXXX)
|
FILE_SHA=$(mktemp /tmp/plexupdate.sha.XXXX)
|
||||||
FILE_WGETLOG=$(mktemp /tmp/plexupdate.wget.XXXX)
|
FILE_WGETLOG=$(mktemp /tmp/plexupdate.wget.XXXX)
|
||||||
|
@ -519,7 +520,7 @@ if [ "${AUTOSTART}" = "yes" ]; then
|
||||||
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 "$SYSTEMDUNIT"
|
||||||
elif hash service 2>/dev/null; then
|
elif hash service 2>/dev/null; then
|
||||||
service plexmediaserver start
|
service plexmediaserver start
|
||||||
elif [ -x /etc/init.d/plexmediaserver ]; then
|
elif [ -x /etc/init.d/plexmediaserver ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue