fix regex for vmail-domains- scripts

This commit is contained in:
Matthew Saunders Brown 2024-12-08 14:21:05 -08:00
parent fe4ccf2c3e
commit 2cab4a61e3

View File

@ -12,7 +12,7 @@ readonly VMAIL_DIR=/var/vmail
readonly MYSQL_CONNECTION_INFO_FILE=$VMAIL_DIR/.my.cnf readonly MYSQL_CONNECTION_INFO_FILE=$VMAIL_DIR/.my.cnf
# switch to required user # switch to required user
if [[ $(basename $0) == "vmail-domains-*" ]] || [[ $(basename $0) == "vmail-dovecot-"* ]] || [[ $(basename $0) == "vmail-webmail-"* ]]; then if [[ $(basename $0) == "vmail-domains-"* ]] || [[ $(basename $0) == "vmail-dovecot-"* ]] || [[ $(basename $0) == "vmail-webmail-"* ]]; then
if [[ "$USER" != "root" ]]; then if [[ "$USER" != "root" ]]; then
exec sudo -u root $0 "$@" exec sudo -u root $0 "$@"
fi fi