From 3dd010b40ad76acc4fa718a3c43320528877cc92 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 6 Apr 2016 15:44:56 -0400 Subject: [PATCH] User and and instead of defaults --- distros/ubuntu1504/zoneminder.postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/ubuntu1504/zoneminder.postinst b/distros/ubuntu1504/zoneminder.postinst index 086bda4cd..cf1c5e218 100644 --- a/distros/ubuntu1504/zoneminder.postinst +++ b/distros/ubuntu1504/zoneminder.postinst @@ -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