From 5dd4de442d493cef21d9256a67e708f67415bc2d Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Sun, 17 Dec 2023 16:51:21 -0500 Subject: [PATCH] Fix mac address defaults. --- deployment/down.sh | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/deployment/down.sh b/deployment/down.sh index c2f30a0..c7b2a67 100755 --- a/deployment/down.sh +++ b/deployment/down.sh @@ -17,6 +17,10 @@ SKIP_WWW_SERVER=false SKIP_LNPLAY_SERVER=false BACKUP_WWW_APPS=true +WWW_SERVER_MAC_ADDRESS= +BTCPAY_SERVER_MAC_ADDRESS= +LNPLAY_SERVER_MAC_ADDRESS= + # grab any modifications from the command line. for i in "$@"; do case $i in @@ -43,19 +47,6 @@ for i in "$@"; do esac done -SERVERS= -if [ "$SKIP_BTCPAY_SERVER" = false ]; then - SERVERS="btcpayserver" -fi - -if [ "$SKIP_WWW_SERVER" = false ]; then - SERVERS="www $SERVERS" -fi - -if [ "$SKIP_LNPLAY_SERVER" = false ]; then - SERVERS="lnplayserver $SERVERS" -fi - . ./deployment_defaults.sh . ./remote_env.sh @@ -71,6 +62,20 @@ source ./project/domain_env.sh source ./domain_list.sh +SERVERS= +if [ "$SKIP_BTCPAY_SERVER" = false ] && [ -n "$WWW_SERVER_MAC_ADDRESS" ]; then + SERVERS="btcpayserver" +fi + +if [ "$SKIP_WWW_SERVER" = false ] && [ -n "$BTCPAY_SERVER_MAC_ADDRESS" ]; then + SERVERS="www $SERVERS" +fi + +if [ "$SKIP_LNPLAY_SERVER" = false ] && [ -n "$LNPLAY_SERVER_MAC_ADDRESS" ]; then + SERVERS="lnplayserver $SERVERS" +fi + + for VIRTUAL_MACHINE in $SERVERS; do INCUS_VM_NAME="$VIRTUAL_MACHINE-${PRIMARY_DOMAIN//./-}"