make vmail-dovecot-* scripts run as root
This commit is contained in:
parent
cde8de9972
commit
fddddb877a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user