This commit is contained in:
Alexey Bannov 2017-08-15 09:07:24 -04:00
parent be2c725a03
commit e369715b63
1 changed files with 11 additions and 0 deletions

View File

@ -263,6 +263,17 @@ if [ ${MAIL_SERVER_DB_HOST} ]; then
echo "MAIL_SERVER_API_HOST is empty";
exit 502;
fi
else
if [[ ! $MAIL_SERVER_API_HOST =~ $VALID_IP_ADDRESS_REGEX ]]; then
MAIL_SERVER_API_HOST=$(dig +short ${MAIL_SERVER_API_HOST});
fi
if [ -z "${MAIL_SERVER_API_HOST}" ]; then
echo "MAIL_SERVER_API_HOST not correct";
exit 502;
fi
fi
fi