From 6967455c8f2b1ee2e7182ec08b082531d87b51e8 Mon Sep 17 00:00:00 2001 From: Matt Sicker Date: Sun, 2 Sep 2012 13:29:17 -0500 Subject: [PATCH] Added insserv support for Debian install script. --- installers/debian.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/installers/debian.sh b/installers/debian.sh index 39babbb..a9e2fbb 100644 --- a/installers/debian.sh +++ b/installers/debian.sh @@ -13,7 +13,8 @@ function install_dependencies() { function reload_cron() { install_log "Reloading cron service" - if [ -x $(which service) ]; then + hash service 2>/dev/null + if [[ $? == 0 ]]; then service cron reload else /etc/init.d/cron reload @@ -22,5 +23,10 @@ function reload_cron() { function enable_init() { install_log "Enabling automatic startup and shutdown" - update-rc.d msm defaults + hash insserv 2>/dev/null + if [[ $? == 0 ]]; then + insserv msm + else + update-rc.d msm defaults + fi }