From 8da9e63f7f379dfe875952ab2dc7d4d5e23f5c80 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Thu, 9 Mar 2023 09:01:07 -0500 Subject: [PATCH] Fix indentation. --- deploy.sh | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/deploy.sh b/deploy.sh index f4da5e9..b3817dc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -399,29 +399,30 @@ for VIRTUAL_MACHINE in www btcpayserver; do DDNS_HOST="$BASE_IMAGE_VM_NAME" ROOT_DISK_SIZE_GB=8 else - echo "ERROR: VIRTUAL_MACHINE not within allowable bounds." - exit + echo "ERROR: VIRTUAL_MACHINE not within allowable bounds." + exit + fi + + export DDNS_HOST="$DDNS_HOST" + export FQDN="$DDNS_HOST.$DOMAIN_NAME" + export LXD_VM_NAME="${FQDN//./-}" + export VIRTUAL_MACHINE="$VIRTUAL_MACHINE" + export REMOTE_CERT_DIR="$REMOTE_CERT_BASE_DIR/$FQDN" + export MAC_ADDRESS_TO_PROVISION="$MAC_ADDRESS_TO_PROVISION" + + ./deploy_vms.sh + + if [ "$VIRTUAL_MACHINE" = www ]; then + # this tells our local docker client to target the remote endpoint via SSH + export DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN" + + # enable docker swarm mode so we can support docker stacks. + if docker info | grep -q "Swarm: inactive"; then + docker swarm init --advertise-addr enp6s0 fi - - export DDNS_HOST="$DDNS_HOST" - export FQDN="$DDNS_HOST.$DOMAIN_NAME" - export LXD_VM_NAME="${FQDN//./-}" - export VIRTUAL_MACHINE="$VIRTUAL_MACHINE" - export REMOTE_CERT_DIR="$REMOTE_CERT_BASE_DIR/$FQDN" - export MAC_ADDRESS_TO_PROVISION="$MAC_ADDRESS_TO_PROVISION" - - ./deploy_vms.sh - - if [ "$VIRTUAL_MACHINE" = www ]; then - # this tells our local docker client to target the remote endpoint via SSH - export DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN" - - # enable docker swarm mode so we can support docker stacks. - if docker info | grep -q "Swarm: inactive"; then - docker swarm init --advertise-addr enp6s0 - fi - fi - done + fi + +done # let's stub out the rest of our site definitions, if any. for DOMAIN_NAME in ${OTHER_SITES_LIST//,/ }; do