Skip to content
Snippets Groups Projects
Commit 8718ca08 authored by Daniel's avatar Daniel
Browse files

FIX: Shell command quoting fixed.

parent 572451b7
No related branches found
No related tags found
No related merge requests found
...@@ -84,7 +84,7 @@ function grant() { ...@@ -84,7 +84,7 @@ function grant() {
if [[ "$1" == "--strict" ]] ; then if [[ "$1" == "--strict" ]] ; then
for host in ${DATABASE_USER_HOST_LIST//,/ } ; do for host in ${DATABASE_USER_HOST_LIST//,/ } ; do
CMD="SELECT COUNT(*) FROM mysql.user WHERE user='${DATABASE_USER}' AND host='${host}';" CMD="SELECT COUNT(*) FROM mysql.user WHERE user='${DATABASE_USER}' AND host='${host}';"
[[ $SQL -s -N -e "$CMD" == 0 ]] || { [[ $(SQL -s -N -e "$CMD") == 0 ]] || {
echo "The user '${DATABASE_USER}@${host}' is already in the database." echo "The user '${DATABASE_USER}@${host}' is already in the database."
echo "Please use another user or delete it, e.g. with" echo "Please use another user or delete it, e.g. with"
echo "'mysql -u ${MYSQL_USER} -p -e \"DROP USER ${DATABASE_USER}@${host};\"'" echo "'mysql -u ${MYSQL_USER} -p -e \"DROP USER ${DATABASE_USER}@${host};\"'"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment