From 5e3476b3019837f6a91c0867e3ff07b2449d9030 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 27 Nov 2014 18:25:09 +0100 Subject: [PATCH] Use systemctl to control zoneminder service in postinst script --- distros/debian8/zoneminder.postinst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distros/debian8/zoneminder.postinst b/distros/debian8/zoneminder.postinst index d06f9c641..16adbbce6 100644 --- a/distros/debian8/zoneminder.postinst +++ b/distros/debian8/zoneminder.postinst @@ -18,7 +18,7 @@ if [ "$1" = "configure" ]; then echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql fi - invoke-rc.d zoneminder stop || true + systemctl stop zoneminder.service || true zmupdate.pl --nointeractive else @@ -34,9 +34,9 @@ if [ "$1" = "configure" ]; then fi fi # Ensure zoneminder is stopped... -if [ -x "/etc/init.d/zoneminder" ]; then - if invoke-rc.d zoneminder status ; then - invoke-rc.d zoneminder stop || exit $? +if [ -f "/lib/systemd/system/zoneminder.service" ]; then + if systemctl status zoneminder.service ; then + systemctl stop zoneminder.service || exit $? fi fi