From 542fe8a860c8dfbf98d9362e1c67cecb84521fb3 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 13 Jun 2016 10:28:57 +0100 Subject: [PATCH] update symlinks too, follow up to ed21517 --- ctl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ctl b/ctl index d16f0c63..6ff80df4 100755 --- a/ctl +++ b/ctl @@ -41,11 +41,13 @@ if [ "$action" = "install" ]; then BASE=`pwd` if [ -x /bin/systemctl ]; then if [ -d /etc/systemd/system/ ]; then - rm -f /lib/systemd/system/pandora.service \ - /lib/systemd/system/pandora-cron.service \ - /lib/systemd/system/pandora-encoding.service \ - /lib/systemd/system/pandora-tasks.service \ - /lib/systemd/system/pandora-websocketd.service + for service in $SERVICES; do + if [ -e /lib/systemd/system/${service}.service ]; then + rm -f /lib/systemd/system/${service}.service \ + /etc/systemd/system/multi-user.target.wants/${service}.service + fi + done + cp $BASE/etc/systemd/system/*.service /etc/systemd/system/ cp $BASE/etc/tmpfiles.d/pandora.conf /etc/tmpfiles.d/ systemd-tmpfiles --create /etc/tmpfiles.d/pandora.conf >/dev/null || true