From 3925d68fa6bcc92dd9bd312826f7becb44431f22 Mon Sep 17 00:00:00 2001 From: Cody Cook Date: Sun, 5 Nov 2017 10:45:52 -0800 Subject: [PATCH] Add support for $SYSTEMDUNIT Default SYSTEMDUNIT = plexmediaserver.service Can be overwritten with configuration file. --- plexupdate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index fa46cb1..d04c590 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -58,6 +58,7 @@ WGETOPTIONS="" # extra options for wget. Used for progress bar. CHECKUPDATE=yes NOTIFY=no CHECKONLY=no +SYSTEMDUNIT=plexmediaserver.service FILE_SHA=$(mktemp /tmp/plexupdate.sha.XXXX) FILE_WGETLOG=$(mktemp /tmp/plexupdate.wget.XXXX) @@ -519,7 +520,7 @@ if [ "${AUTOSTART}" = "yes" ]; then fi # Check for systemd if hash systemctl 2>/dev/null; then - systemctl start plexmediaserver.service + systemctl start "$SYSTEMDUNIT" elif hash service 2>/dev/null; then service plexmediaserver start elif [ -x /etc/init.d/plexmediaserver ]; then