More checking for email creation

This commit is contained in:
Bob Mottram 2016-11-01 19:07:44 +00:00
parent 98347ef065
commit 11ac6ea7d7
1 changed files with 12 additions and 1 deletions

View File

@ -1649,8 +1649,19 @@ function install_email {
read_config_param MY_EMAIL_ADDRESS
read_config_param DH_KEYLENGTH
if [ ${#MY_EMAIL_ADDRESS} -lt 3 ]; then
if [ ! $MY_USERNAME ]; then
echo $'No username for email installation'
exit 73672
fi
if [ ! $DEFAULT_DOMAIN_NAME ]; then
echo $'No default domain name for email installation'
exit 57634
fi
my_email="$MY_EMAIL_ADDRESS"
if [ ${#my_email} -lt 3 ]; then
MY_EMAIL_ADDRESS=${MY_USERNAME}@${DEFAULT_DOMAIN_NAME}
write_config_param "MY_EMAIL_ADDRESS" "$MY_EMAIL_ADDRESS"
fi
install_email_basic