Use systemctl to control zoneminder service in postinst script

This commit is contained in:
Emmanuel Papin 2014-11-27 18:25:09 +01:00
parent 3e7e3960f5
commit 5e3476b301
1 changed files with 4 additions and 4 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
invoke-rc.d zoneminder stop || true systemctl stop zoneminder.service || true
zmupdate.pl --nointeractive zmupdate.pl --nointeractive
else else
@ -34,9 +34,9 @@ if [ "$1" = "configure" ]; then
fi fi
fi fi
# Ensure zoneminder is stopped... # Ensure zoneminder is stopped...
if [ -x "/etc/init.d/zoneminder" ]; then if [ -f "/lib/systemd/system/zoneminder.service" ]; then
if invoke-rc.d zoneminder status ; then if systemctl status zoneminder.service ; then
invoke-rc.d zoneminder stop || exit $? systemctl stop zoneminder.service || exit $?
fi fi
fi fi