From 637ab5608c3e591263afe8e61f102ae37dc89de3 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sat, 22 Feb 2020 22:24:22 +0100 Subject: [PATCH] Auto-creation of networks. --- start_or_update.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/start_or_update.sh b/start_or_update.sh index 3d11e8d..ed11c68 100755 --- a/start_or_update.sh +++ b/start_or_update.sh @@ -1,4 +1,12 @@ #!/bin/bash +for NETWORK in reverse-proxy +do + sudo docker network inspect ${NETWORK} && continue + sudo docker network create ${NETWORK} + sudo docker network inspect ${NETWORK} || \ + { echo "ERROR: could not create network ${NETWORK}, exiting."; exit 1; } +done + test -f ~/openrc.sh || { echo "ERROR: ~/openrc.sh not found, exiting."; exit 1; } source ~/openrc.sh INSTANCE=$(~/env_py3/bin/openstack server show -c id --format value $(hostname))