Set MM_HOSTNAME to hostname -i.

This commit is contained in:
Abhilash Raj
2017-07-23 13:42:36 -07:00
committed by Abhilash Raj
parent 2126bae2a3
commit a7ab6509f1
3 changed files with 7 additions and 5 deletions

View File

@@ -25,10 +25,11 @@ function wait_for_postgres () {
# Empty the config file.
echo "# This file is autogenerated at container startup." > /etc/mailman.cfg
# Check if $MM_HOSTNAME is set, if not, set it to a default value.
# TODO: Factor this out to a function.
# Check if $MM_HOSTNAME is set, if not, set it to the value returned by
# `hostname -i` command to set it to whatever IP address is assigned to the
# container.
if [[ ! -v MM_HOSTNAME ]]; then
export MM_HOSTNAME='172.19.199.2'
export MM_HOSTNAME=`hostname -i`
fi
if [[ ! -v SMTP_HOST ]]; then