Create an order

This commit is contained in:
andryyy
2016-12-12 10:01:27 +01:00
parent dfe2dc2f54
commit 64d92e504a
14 changed files with 14 additions and 16 deletions

13
001-build-network.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
. mailcow.conf
if [[ -z $(docker network ls --filter "name=${DOCKER_NETWORK}" -q) ]]; then
docker network create ${DOCKER_NETWORK} --subnet ${DOCKER_SUBNET}
else
if [[ $(docker network inspect mailcow-network --format='{{range .IPAM.Config}}{{.Subnet}}{{end}}' 2> /dev/null) != ${DOCKER_SUBNET} ]]; then
echo "ERROR: mailcow network exists, but has wrong subnet!"
exit 1
fi
echo "Correct mailcow network exists, skipped..."
exit 0
fi