forked from ss/sovereign-stack
Restoration improvements.
This commit is contained in:
parent
03f80ade26
commit
3bf42bba2a
@ -30,6 +30,7 @@ VPS_HOSTING_TARGET=lxd
|
|||||||
RUN_CERT_RENEWAL=true
|
RUN_CERT_RENEWAL=true
|
||||||
USER_NO_BACKUP=false
|
USER_NO_BACKUP=false
|
||||||
USER_RUN_RESTORE=false
|
USER_RUN_RESTORE=false
|
||||||
|
RESTORE_WWW_USERDATA=true
|
||||||
RESTORE_BTCPAY=false
|
RESTORE_BTCPAY=false
|
||||||
USER_SKIP_WWW=false
|
USER_SKIP_WWW=false
|
||||||
USER_SKIP_BTCPAY=false
|
USER_SKIP_BTCPAY=false
|
||||||
@ -254,6 +255,7 @@ function run_domain {
|
|||||||
if [ ! -d "$LOCAL_BACKUP_PATH" ]; then
|
if [ ! -d "$LOCAL_BACKUP_PATH" ]; then
|
||||||
mkdir -p "$LOCAL_BACKUP_PATH"
|
mkdir -p "$LOCAL_BACKUP_PATH"
|
||||||
BACKUP_PATH_CREATED=true
|
BACKUP_PATH_CREATED=true
|
||||||
|
RESTORE_WWW_USERDATA=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DDNS_HOST=
|
DDNS_HOST=
|
||||||
@ -370,8 +372,6 @@ function run_domain {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash -c ./deployment/stub_nginxconf.sh
|
|
||||||
|
|
||||||
MACHINE_EXISTS=false
|
MACHINE_EXISTS=false
|
||||||
if [ "$VPS_HOSTING_TARGET" = aws ] && docker-machine ls -q | grep -q "$FQDN"; then
|
if [ "$VPS_HOSTING_TARGET" = aws ] && docker-machine ls -q | grep -q "$FQDN"; then
|
||||||
MACHINE_EXISTS=true
|
MACHINE_EXISTS=true
|
||||||
@ -382,7 +382,7 @@ function run_domain {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$USER_NO_BACKUP" = true ]; then
|
if [ "$USER_NO_BACKUP" = true ]; then
|
||||||
RUN_BACKUP=true
|
RUN_BACKUP=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$MACHINE_EXISTS" = true ]; then
|
if [ "$MACHINE_EXISTS" = true ]; then
|
||||||
@ -490,6 +490,7 @@ export GITEA_MYSQL_ROOT_PASSWORD="$(new_pass)"
|
|||||||
|
|
||||||
## BTCPAY SERVER; if true, then a BTCPay server is deployed.
|
## BTCPAY SERVER; if true, then a BTCPay server is deployed.
|
||||||
export DEPLOY_BTCPAY_SERVER=false
|
export DEPLOY_BTCPAY_SERVER=false
|
||||||
|
export BTCPAYSERVER_MAC_ADDRESS="CHANGE_ME_REQUIRED"
|
||||||
|
|
||||||
# CHAIN to DEPLOY; valid are 'regtest', 'testnet', and 'mainnet'
|
# CHAIN to DEPLOY; valid are 'regtest', 'testnet', and 'mainnet'
|
||||||
export BTC_CHAIN=regtest
|
export BTC_CHAIN=regtest
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
set -exu
|
set -exu
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
bash -c ./stub_nginxconf.sh
|
||||||
|
|
||||||
TOR_CONFIG_PATH=
|
TOR_CONFIG_PATH=
|
||||||
|
|
||||||
ssh "$FQDN" mkdir -p "$REMOTE_HOME/ghost_site" "$REMOTE_HOME/ghost_db"
|
ssh "$FQDN" mkdir -p "$REMOTE_HOME/ghost_site" "$REMOTE_HOME/ghost_db"
|
||||||
@ -43,8 +45,12 @@ if [ "$RUN_BACKUP" = true ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$RUN_RESTORE" = true ]; then
|
if [ "$RUN_RESTORE" = true ]; then
|
||||||
|
# Generally speaking we try to restore data. But if the BACKUP directory was
|
||||||
|
# just created, we know that we'll deploy fresh.
|
||||||
|
if [ "$RESTORE_WWW_USERDATA" = true ]; then
|
||||||
./restore.sh
|
./restore.sh
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$DEPLOY_ONION_SITE" = true ]; then
|
if [ "$DEPLOY_ONION_SITE" = true ]; then
|
||||||
# ensure the tor image is built
|
# ensure the tor image is built
|
||||||
|
Loading…
Reference in New Issue
Block a user