From 4bf1be59cd88d0974f7ddafa4c47e576ab896fbe Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 27 Nov 2014 20:21:56 +0100 Subject: [PATCH] Use deb-systemd-invoke instead of systemctl in zoneminder.postinst --- distros/debian8/zoneminder.postinst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/distros/debian8/zoneminder.postinst b/distros/debian8/zoneminder.postinst index 16adbbce6..10e4160a8 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 - systemctl stop zoneminder.service || true + deb-systemd-invoke stop zoneminder.service || true zmupdate.pl --nointeractive else @@ -34,11 +34,7 @@ if [ "$1" = "configure" ]; then fi fi # Ensure zoneminder is stopped... -if [ -f "/lib/systemd/system/zoneminder.service" ]; then - if systemctl status zoneminder.service ; then - systemctl stop zoneminder.service || exit $? - fi -fi +deb-systemd-invoke stop zoneminder.service || exit $? if [ "$1" = "configure" ]; then if [ -z "$2" ]; then