Make Migration flag more broad. Use --skip

This commit is contained in:
Derek Smith 2022-08-03 10:57:19 -04:00
parent 175d743c32
commit 9a4f90d27b
Signed by: farscapian
GPG Key ID: 8F1CD799CCA516CC
2 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ if ! lsb_release -d | grep -q "Ubuntu 22.04 LTS"; then
exit 1 exit 1
fi fi
MIGRATE_BTCPAY=false MIGRATE_VPS=false
DOMAIN_NAME= DOMAIN_NAME=
RESTORE_ARCHIVE= RESTORE_ARCHIVE=
VPS_HOSTING_TARGET=lxd VPS_HOSTING_TARGET=lxd
@ -80,8 +80,8 @@ for i in "$@"; do
USER_NO_BACKUP=true USER_NO_BACKUP=true
shift shift
;; ;;
--migrate-btcpay) --migrate)
MIGRATE_BTCPAY=true MIGRATE_VPS=true
RUN_CERT_RENEWAL=false RUN_CERT_RENEWAL=false
shift shift
;; ;;
@ -211,7 +211,7 @@ function run_domain {
export RUN_CERT_RENEWAL="$RUN_CERT_RENEWAL" export RUN_CERT_RENEWAL="$RUN_CERT_RENEWAL"
export BTC_CHAIN="$BTC_CHAIN" export BTC_CHAIN="$BTC_CHAIN"
export UPDATE_BTCPAY="$UPDATE_BTCPAY" export UPDATE_BTCPAY="$UPDATE_BTCPAY"
export MIGRATE_BTCPAY="$MIGRATE_BTCPAY" export MIGRATE_VPS="$MIGRATE_VPS"
export RECONFIGURE_BTCPAY_SERVER="$RECONFIGURE_BTCPAY_SERVER" export RECONFIGURE_BTCPAY_SERVER="$RECONFIGURE_BTCPAY_SERVER"
# iterate over all our server endpoints and provision them if needed. # iterate over all our server endpoints and provision them if needed.
@ -387,7 +387,7 @@ function run_domain {
if [ "$MACHINE_EXISTS" = true ]; then if [ "$MACHINE_EXISTS" = true ]; then
# we delete the machine if the user has directed us to # we delete the machine if the user has directed us to
if [ "$MIGRATE_BTCPAY" = true ]; then if [ "$MIGRATE_VPS" = true ]; then
# if the RESTORE_ARCHIVE is not set, then # if the RESTORE_ARCHIVE is not set, then
if [ -z "$RESTORE_ARCHIVE" ]; then if [ -z "$RESTORE_ARCHIVE" ]; then
@ -423,7 +423,7 @@ function run_domain {
RESTORE_BTCPAY="$RESTORE_BTCPAY" UPDATE_BTCPAY="$UPDATE_BTCPAY" RUN_RESTORE="$USER_RUN_RESTORE" RUN_BACKUP="$RUN_BACKUP" RUN_SERVICES=true ./deployment/domain_init.sh RESTORE_BTCPAY="$RESTORE_BTCPAY" UPDATE_BTCPAY="$UPDATE_BTCPAY" RUN_RESTORE="$USER_RUN_RESTORE" RUN_BACKUP="$RUN_BACKUP" RUN_SERVICES=true ./deployment/domain_init.sh
fi fi
else else
if [ "$MIGRATE_BTCPAY" = true ]; then if [ "$MIGRATE_VPS" = true ]; then
echo "INFO: User has indicated to delete the machine, but it doesn't exist. Going to create it anyway." echo "INFO: User has indicated to delete the machine, but it doesn't exist. Going to create it anyway."
fi fi

View File

@ -25,7 +25,7 @@ elif [ "$RESTORE_BTCPAY" = true ]; then
OPEN_URL=true OPEN_URL=true
# if this is a new VM from a migration procedure, then we can now run setup. # if this is a new VM from a migration procedure, then we can now run setup.
if [ "$MIGRATE_BTCPAY" = true ]; then if [ "$MIGRATE_VPS" = true ]; then
./stub_btcpay_setup.sh ./stub_btcpay_setup.sh
fi fi