From 9ba5260defeccd6953c6c24cbc9c82749bc2cc59 Mon Sep 17 00:00:00 2001 From: johan Date: Sat, 4 Jan 2014 14:28:33 +0100 Subject: [PATCH] Fix install script Former-commit-id: 58920c68dc4635f6a2519b15d921f4c7d3f3ab6f --- bin/install_hyperion.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/install_hyperion.sh b/bin/install_hyperion.sh index 78805721..baef7126 100755 --- a/bin/install_hyperion.sh +++ b/bin/install_hyperion.sh @@ -18,7 +18,12 @@ then fi # Stop hyperion daemon if it is running -/sbin/initctl stop hyperion +# Start the hyperion daemon +if [ $USE_INITCTL -eq 1 ]; then + /sbin/initctl stop hyperion +else + /usr/sbin/service hyperion stop +fi # Get and extract the Hyperion binaries and effects to /opt wget https://raw.github.com/tvdzwan/hyperion/master/deploy/hyperion.tar.gz -O - | tar -C /opt -xz @@ -44,7 +49,7 @@ if [ $USE_INITCTL -eq 1 ]; then fi else # place startup script in init.d and add it to upstart - ln -fs /opt/hyperion/init.d/hyperion.init.sh /etc/hyperion/init.d/hyperion + ln -fs /opt/hyperion/init.d/hyperion.init.sh /etc/init.d/hyperion chmod +x /etc/init.d/hyperion update-rc.d hyperion defaults 98 02 fi