Update mail-user.sh

This commit is contained in:
myve 2024-03-22 13:16:06 -06:00
commit 6f2fb60b6f

View file

@ -34,6 +34,49 @@ then
die 'A static variable is nonexistent'
fi
# Grab options
while [ ${1} != "" ]
do
case ${1} in
-u | --user )
if [ ${2} != "" ]
then
mailuser=${2}
shift
fi
;;
-p | --pass )
if [ ${2} != "" ]
then
export {mailpass,mailpass2}=${2}
shift
fi
;;
-a | --admin )
if [ ${2} != "" ]
then
export {postfixadminpass,postfixadminpass2}=${2}
shift
fi
;;
-? | -h | --help )
cat <<HELP
Parameters:
-u, --user Mail username
-p, --pass Mail password
-a, --admin Admin password
-?, -h, --help This help
HELP
exit 0
;;
* )
echo "Unknown parameter ${1}" 1>&2
exit 1
;;
esac
shift
done
clear
# Activate sudo