From 0d45ff6e60b2dceb559e2ef89ba988df1d8880d9 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Fri, 22 Nov 2024 11:18:28 -0800 Subject: [PATCH] update script names that 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 ea3baf5..1c112ab 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-arc.sh" ]] || [[ $(basename $0) == "vmail-domains-del.sh" ]] || [[ $(basename $0) == "vmail-domains-exp.sh" ]] || [[ $(basename $0) == "vmail-domains-imp.sh" ]] || [[ $(basename $0) == "vmail-dovecot-"* ]]; then +if [[ $(basename $0) == "vmail-domains-*" ]] || [[ $(basename $0) == "vmail-dovecot-"* ]] || [[ $(basename $0) == "vmail-webmail-"* ]]; then if [[ "$USER" != "root" ]]; then exec sudo -u root $0 "$@" fi