su to vmail user

This commit is contained in:
Matthew Saunders Brown 2021-03-01 12:04:51 -08:00
parent e54fcfdab1
commit 4364e47606

View File

@ -1,5 +1,10 @@
# vmail configs
# any script that includes this conf file will force user to be vmail
if [ "$USER" != "vmail" ]; then
exec su --shell /bin/bash "vmail" "$0" -- "$@"
fi
# constants
readonly MYSQL_CONNECTION_INFO_FILE=/usr/local/etc/vmail-db-info.conf
@ -55,4 +60,5 @@ function vmail::yesno() {
esac
done
}