always restart zoneminder on upgrade, not just when doing a db update
This commit is contained in:
parent
c33b179a59
commit
5ee230a141
|
@ -18,6 +18,8 @@ if [ "$1" = "configure" ]; then
|
|||
fi
|
||||
|
||||
# Do this every time the package is installed or upgraded
|
||||
# Ensure zoneminder is stopped
|
||||
deb-systemd-invoke stop zoneminder.service || exit $?
|
||||
|
||||
if [ "$ZM_DB_HOST" = "localhost" ]; then
|
||||
|
||||
|
@ -41,13 +43,8 @@ if [ "$1" = "configure" ]; then
|
|||
echo "grant lock tables,alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
|
||||
# Ensure zoneminder is stopped
|
||||
deb-systemd-invoke stop zoneminder.service || exit $?
|
||||
zmupdate.pl --nointeractive
|
||||
zmupdate.pl --nointeractive -f
|
||||
echo "Done Updating, starting ZoneMinder"
|
||||
deb-systemd-invoke restart zoneminder.service || exit $?
|
||||
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
|
@ -58,6 +55,8 @@ if [ "$1" = "configure" ]; then
|
|||
else
|
||||
echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)"
|
||||
fi
|
||||
echo "Done Updating, starting ZoneMinder"
|
||||
deb-systemd-invoke restart zoneminder.service || exit $?
|
||||
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue