1
1

Compare commits

...

2 Commits

Author SHA1 Message Date
d35a882d8b
Scope update invoke to project level. 2023-03-23 15:35:07 -04:00
3884c24e48
Iterate over projects in show.sh 2023-03-23 14:25:31 -04:00
2 changed files with 32 additions and 9 deletions

View File

@ -1,13 +1,36 @@
#!/bin/bash
echo "LXD REMOTE: $(lxc remote get-default)"
set -eu
cd "$(dirname "$0")"
lxc project list
. ../defaults.sh
. ./remote_env.sh
echo "Global Settings:"
lxc image list
lxc storage list
lxc storage volume list ss-base
lxc image list
lxc project list
lxc network list
lxc profile list
lxc list
echo
echo
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
NO_PARENS="${PROJECT_CHAIN:1:${#PROJECT_CHAIN}-2}"
PROJECT_PREFIX=$(echo "$NO_PARENS" | cut -d'|' -f1)
BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN"
if ! lxc info | grep "project:" | grep -q "$PROJECT_NAME"; then
if lxc project list | grep -q "$PROJECT_NAME"; then
lxc project switch "$PROJECT_NAME"
fi
fi
lxc network list
lxc profile list
lxc list
done

View File

@ -113,7 +113,7 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
cd -
# run deploy which backups up everything, but doesnt restart any services.
bash -c "./project/deploy.sh --stop --no-cert-renew --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH"
bash -c "./project/deploy.sh --project=$PROJECT_NAME --stop --no-cert-renew --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH"
# call the destroy script. If user proceed, then user data is DESTROYED!
./destroy.sh
@ -125,6 +125,6 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
cd -
# Then we can run a restore operation and specify the backup archive at the CLI.
bash -c "./project/deploy.sh -y --restore-www --restore-btcpay --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH"
bash -c "./project/deploy.sh --project=$PROJECT_NAME -y --restore-www --restore-btcpay --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH"
done