From fddddb877ad23cfc77f7aaa8125c0f56477ba188 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Mon, 19 Jun 2023 11:25:03 -0700 Subject: [PATCH] make vmail-dovecot-* scripts run as root --- bin/vmail.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/vmail.sh b/bin/vmail.sh index 6eb4c9a..20d1e5d 100755 --- a/bin/vmail.sh +++ b/bin/vmail.sh @@ -12,7 +12,7 @@ readonly VMAIL_DIR=/var/vmail readonly MYSQL_CONNECTION_INFO_FILE=$VMAIL_DIR/.my.cnf # switch to required user -if [[ $(basename $0) == "vmail-domains-exp.sh" ]] || [[ $(basename $0) == "vmail-domains-imp.sh" ]]; then +if [[ $(basename $0) == "vmail-domains-exp.sh" ]] || [[ $(basename $0) == "vmail-domains-imp.sh" ]] || [[ $(basename $0) == "vmail-dovecot-"* ]]; then if [[ "$USER" != "root" ]]; then exec sudo -u root $0 "$@" fi