Compare commits
2 Commits
2730bda32b
...
d35a882d8b
Author | SHA1 | Date | |
---|---|---|---|
d35a882d8b | |||
3884c24e48 |
@ -1,13 +1,36 @@
|
|||||||
#!/bin/bash
|
#!/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 list
|
||||||
lxc storage volume list ss-base
|
lxc storage volume list ss-base
|
||||||
lxc image list
|
|
||||||
lxc project 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 network list
|
||||||
lxc profile list
|
lxc profile list
|
||||||
lxc list
|
lxc list
|
||||||
|
|
||||||
|
done
|
@ -113,7 +113,7 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
|||||||
cd -
|
cd -
|
||||||
|
|
||||||
# run deploy which backups up everything, but doesnt restart any services.
|
# 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!
|
# call the destroy script. If user proceed, then user data is DESTROYED!
|
||||||
./destroy.sh
|
./destroy.sh
|
||||||
@ -125,6 +125,6 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
|||||||
cd -
|
cd -
|
||||||
|
|
||||||
# Then we can run a restore operation and specify the backup archive at the CLI.
|
# 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
|
done
|
Loading…
Reference in New Issue
Block a user