User and and instead of defaults

pull/1403/head
Isaac Connor 2016-04-06 15:44:56 -04:00
parent 6cdbcfc9e6
commit 3dd010b40a
1 changed files with 2 additions and 2 deletions

View File

@ -32,9 +32,9 @@ if [ "$1" = "configure" ]; then
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
# This creates the user.
echo 'grant lock tables, alter,select,insert,update,delete,create,index 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,create,index 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,select,insert,update,deletecreate, index on zm.* to 'zmuser'@localhost;' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
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