Fixes #364 - hostname/domainame is required.

This commit is contained in:
Thomas VIAL 2016-10-30 12:25:19 +01:00
parent 05f993ceb8
commit ae288279af
No known key found for this signature in database
GPG Key ID: 0394CEE552FAFEFC
2 changed files with 18 additions and 1 deletions

View File

@ -1,10 +1,18 @@
#!/bin/bash #!/bin/bash
die () { die () {
echo >&2 "$@" echo "## Configuration error:"
echo >&2 "> $@"
exit 1 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 # 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 # processes
# #