remove unneeded --shell option from sudo, fix mbox_ratelimit_default
This commit is contained in:
parent
6bd470c435
commit
18e103e50d
@ -31,8 +31,8 @@ vmail:getoptions "$@"
|
||||
|
||||
# check for domain
|
||||
if [[ -z $domain ]]; then
|
||||
echo "domain name is required"
|
||||
exit
|
||||
echo "ERROR: domain name is required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set initial db query data
|
||||
@ -85,7 +85,7 @@ if [ "$rowcount" -eq '0' ] ; then
|
||||
if [[ "$ratelimit" == "NULL" ]]; then
|
||||
dbquery="$dbquery, mbox_ratelimit_default=NULL"
|
||||
elif [[ "$ratelimit" =~ ^[0-9]+$ ]]; then
|
||||
dbquery="$dbquery, mbox_quota_default='$ratelimit'"
|
||||
dbquery="$dbquery, mbox_ratelimit_default='$ratelimit'"
|
||||
else
|
||||
echo "ERROR: ratelimit (-r) must numeric or NULL"
|
||||
exit 1
|
||||
|
@ -13,15 +13,15 @@ readonly MYSQL_CONNECTION_INFO_FILE=$VMAIL_DIR/.my.cnf
|
||||
# switch to required user
|
||||
if [[ $(basename $0) == "vmail-dkim-"* ]]; then
|
||||
if [[ "$USER" != "Debian-exim" ]]; then
|
||||
exec sudo -u Debian-exim -g ssl-cert --shell /bin/bash $0 $@
|
||||
exec sudo -u Debian-exim -g ssl-cert $0 $@
|
||||
fi
|
||||
elif [[ $(basename $0) == "vmail-purge-spool.sh" ]]; then
|
||||
if [[ "$USER" != "Debian-exim" ]]; then
|
||||
exec sudo -u Debian-exim --shell /bin/bash $0 $@
|
||||
exec sudo -u Debian-exim $0 $@
|
||||
fi
|
||||
else
|
||||
if [[ "$USER" != "vmail" ]]; then
|
||||
exec sudo -u vmail --shell /bin/bash $0 $@
|
||||
exec sudo -u vmail $0 $@
|
||||
else
|
||||
# check that MYSQL_CONNECTION_INFO_FILE exists and is readable
|
||||
if [ ! -f "$MYSQL_CONNECTION_INFO_FILE" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user