output message when not doing dbupdate. put quotes in to fix bash error when ZM_DB_HOST is not defined
parent
b8fb711593
commit
70fb6a6786
|
@ -17,10 +17,12 @@ if [ "$1" = "configure" ]; then
|
|||
# Ensure zoneminder is stopped
|
||||
deb-systemd-invoke stop zoneminder.service || exit $?
|
||||
|
||||
if [ $ZM_DB_HOST == "localhost" ]; then
|
||||
if [ "$ZM_DB_HOST" == "localhost" ]; then
|
||||
echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
# Run the ZoneMinder update tool
|
||||
zmupdate.pl --nointeractive
|
||||
else
|
||||
echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)"
|
||||
fi;
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue