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 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 fi
systemctl stop zoneminder.service || true deb-systemd-invoke stop zoneminder.service || true
zmupdate.pl --nointeractive zmupdate.pl --nointeractive
else else
@ -34,11 +34,7 @@ if [ "$1" = "configure" ]; then
fi fi
fi fi
# Ensure zoneminder is stopped... # Ensure zoneminder is stopped...
if [ -f "/lib/systemd/system/zoneminder.service" ]; then deb-systemd-invoke stop zoneminder.service || exit $?
if systemctl status zoneminder.service ; then
systemctl stop zoneminder.service || exit $?
fi
fi
if [ "$1" = "configure" ]; then if [ "$1" = "configure" ]; then
if [ -z "$2" ]; then if [ -z "$2" ]; then