From f23639078b9c56fb4d449d0263c5b1253b3506e6 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Tue, 10 May 2022 16:24:40 -0700 Subject: [PATCH] fix quota option --- bin/vmail-domains-mod.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/vmail-domains-mod.sh b/bin/vmail-domains-mod.sh index 35236d9..ed888a2 100755 --- a/bin/vmail-domains-mod.sh +++ b/bin/vmail-domains-mod.sh @@ -45,7 +45,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 @@ -57,7 +57,10 @@ if [[ -n $ratelimit ]]; then # make ratelimit uppercase in case it is set to NULL ratelimit=`echo $ratelimit | tr [:lower:] [:upper:]` if [[ "$ratelimit" =~ ^[0-9]+$ ]] || [[ "$ratelimit" == "NULL" ]]; then - dbset=" mbox_ratelimit_default=$ratelimit" + if [ ! -z "$dbset" ]; then + dbset="$dbset," + fi + dbset="$dbset mbox_ratelimit_default=$ratelimit" else echo "ERROR: ratelimit (-r) must numeric or NULL" exit 1