1
1

SKIP proj provis if is DEPLOYMENT_STRING is null

This commit is contained in:
Derek Smith 2023-09-14 09:48:55 -04:00
parent f8d6d2acfc
commit 8780f9e908
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 47 additions and 44 deletions

View File

@ -40,6 +40,9 @@ fi
source "$REMOTE_DEFINITION"
# let's provision the projects if specified in the remote.conf file.
# we assume projects are created EXTERNALLY to sovereign-stack when DEPLOYMENT_STRING is null.
if [ -n "$DEPLOYMENT_STRING" ]; then
# ensure our projects are provisioned according to DEPLOYMENT_STRING
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
NO_PARENS="${PROJECT_CHAIN:1:${#PROJECT_CHAIN}-2}"
@ -53,6 +56,8 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
lxc project set "$PROJECT_NAME" features.networks=true features.images=false features.storage.volumes=true
lxc project switch "$PROJECT_NAME"
fi
done
fi
# default values are already at regtest mode.
if [ "$BITCOIN_CHAIN" = testnet ]; then
@ -92,5 +97,3 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
export BTCPAYSERVER_SSDATA_DISK_SIZE_GB="$BTCPAYSERVER_SSDATA_DISK_SIZE_GB"
export BTCPAYSERVER_BACKUP_DISK_SIZE_GB="$BTCPAYSERVER_BACKUP_DISK_SIZE_GB"
export BTCPAYSERVER_DOCKER_DISK_SIZE_GB="$BTCPAYSERVER_DOCKER_DISK_SIZE_GB"
done

View File

@ -153,7 +153,7 @@ fi
export REMOTE_DEFINITION="$REMOTE_DEFINITION"
source "$REMOTE_DEFINITION"
export LXD_REMOTE_PASSWORD="$LXD_REMOTE_PASSWORD"
export DEPLOYMENT_STRING="$DEPLOYMENT_STRING"
# this is our password generation mechanism. Relying on GPG for secure password generation
function new_pass {