mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Clear up env format and hostname value (#1076)
* Describe format for .env in README * Display used domain and hostname even when they are not acceptable This should be clearer for the user when the hostname was set incorrectly.
This commit is contained in:
parent
cc56b4f89e
commit
0fb4a6d082
|
@ -63,6 +63,9 @@ Download the docker-compose.yml, the .env and the setup.sh files:
|
|||
#### Create a docker-compose environment
|
||||
|
||||
- Edit the `.env` to your liking. Adapt this file with your FQDN.
|
||||
- This file supports only simple `VAR=VAL` lines (see [Documentation](https://docs.docker.com/compose/env-file/)).
|
||||
- Don't quote your values.
|
||||
- Variable substitution is *not* supported (e.g. `OVERRIDE_HOSTNAME=$HOSTNAME.$DOMAINNAME`).
|
||||
- Install [docker-compose](https://docs.docker.com/compose/) in the version `1.6` or higher.
|
||||
|
||||
#### Start Container
|
||||
|
|
|
@ -387,12 +387,13 @@ function _check_hostname() {
|
|||
export DOMAINNAME=$(echo $HOSTNAME | sed s/[^.]*.//)
|
||||
fi
|
||||
|
||||
notify 'inf' "Domain has been set to $DOMAINNAME"
|
||||
notify 'inf' "Hostname has been set to $HOSTNAME"
|
||||
|
||||
if ( ! echo $HOSTNAME | grep -E '^(\S+[.]\S+)$' > /dev/null ); then
|
||||
notify 'err' "Setting hostname/domainname is required"
|
||||
kill `cat /var/run/supervisord.pid` && return 1
|
||||
else
|
||||
notify 'inf' "Domain has been set to $DOMAINNAME"
|
||||
notify 'inf' "Hostname has been set to $HOSTNAME"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue