Fixes #364 - hostname/domainame is required. (#368)

This commit is contained in:
Thomas VIAL 2016-10-30 12:42:29 +01:00 committed by GitHub
parent 05f993ceb8
commit 5298271bfd
2 changed files with 18 additions and 1 deletions

View File

@ -1,10 +1,18 @@
#!/bin/bash
die () {
echo >&2 "$@"
echo "## Configuration error:"
echo >&2 "> $@"
exit 1
}
#
# Check that hostname/domainname is provided (no default docker hostname)
#
if ( ! echo $(hostname) | grep -E '^(\S+[.]\S+)$' ); then
die "Setting hostname/domainname is required."
fi
#
# Default variables
#

View File

@ -1,3 +1,12 @@
#
# configuration checks
#
@test "checking configuration: hostname/domainname" {
run docker run `docker inspect --format '{{ .Config.Image }}' mail`
[ "$status" -eq 1 ]
}
#
# processes
#