Use deb-systemd-invoke instead of systemctl in zoneminder.postinst

This commit is contained in:
Emmanuel Papin 2014-11-27 20:21:56 +01:00
parent bf945cf6f3
commit 4bf1be59cd
1 changed files with 2 additions and 6 deletions

View File

@ -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