From 4dc13ae8d93ef8ceacef967d5ea56470e6fe4b9a Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 24 Oct 2015 20:24:30 -0500 Subject: [PATCH] Added systemd support for the AUTOSTART flag. --- plexupdate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index b1fadb4..cf7b6bd 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -321,7 +321,11 @@ if [ "${AUTOSTART}" == "yes" ]; then elif [ "${REDHAT}" == "no" ]; then echo "The AUTOSTART [-s] option may not be needed on your distribution." fi - sudo service plexmediaserver start + if [ -f "/bin/systemctl" ]; then + sudo systemctl start plexmediaserver.service + else + sudo service plexmediaserver start + fi fi exit 0