allow errors, and add a missing fi

This commit is contained in:
Isaac Connor 2018-03-16 11:58:50 -04:00
parent e8e310b156
commit 3ae9993975
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#! /bin/sh
set -e
set +e
if [ "$1" = "configure" ]; then
@ -56,6 +56,7 @@ if [ "$1" = "configure" ]; then
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost identified by \"${ZM_DB_PASS}\";" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
else
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
fi
else
echo 'NOTE: MySQL/MariaDB not running; please start mysql and run dpkg-reconfigure zoneminder when it is running.'