diff --git a/bin/vmail-domains-mod.sh b/bin/vmail-domains-mod.sh index 8f99efe..2a9ac74 100755 --- a/bin/vmail-domains-mod.sh +++ b/bin/vmail-domains-mod.sh @@ -44,7 +44,7 @@ if [[ -n $quota ]]; then # make quota uppercase in case it is set to NULL quota=`echo $quota | tr [:lower:] [:upper:]` if [[ "$quota" =~ ^[0-9]+$ ]] || [[ "$quota" == "NULL" ]]; then - dbset=" mbox_quota_default=\"$quota\"" + dbset=" mbox_quota_default=$quota" else echo "ERROR: quota (-q) must numeric or NULL" exit 1 @@ -59,7 +59,7 @@ if [[ -n $limit ]]; then if [ ! -z "$dbset" ]; then dbset="$dbset," fi - dbset="$dbset mbox_limit=\"$limit\"" + dbset="$dbset mbox_limit=$limit" else echo "ERROR: limit (-l) must numeric or NULL" exit 1 diff --git a/bin/vmail-mboxes-mod.sh b/bin/vmail-mboxes-mod.sh index b372606..4f68561 100755 --- a/bin/vmail-mboxes-mod.sh +++ b/bin/vmail-mboxes-mod.sh @@ -47,7 +47,7 @@ if [ -n "$quota" ]; then # make quota uppercase in case it is set to NULL quota=`echo $quota | tr [:lower:] [:upper:]` if [[ "$quota" =~ ^[0-9]+$ ]] || [[ "$quota" == "NULL" ]]; then - dbset=" quota=\"$quota\"" + dbset=" quota=$quota" else echo "ERROR: quota (-q) must numeric or NULL" exit 1 @@ -74,9 +74,8 @@ fi if [ -n "$dbset" ]; then # build query - dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'UPDATE vm_mboxes SET $dbset WHERE mbox.id=\"$mbox_id\";'" -# eval $dbcmd - echo $dbcmd + dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE -e 'UPDATE vm_mboxes SET $dbset WHERE id=\"$mbox_id\";'" + eval $dbcmd else