Compare commits
No commits in common. "c2f3612beeb5a386545596fdc3e734b20048013d" and "bc4ac89c19e20c86a8376563a0dfe5a314ea4b0c" have entirely different histories.
c2f3612bee
...
bc4ac89c19
@ -26,4 +26,8 @@ if [ -f "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
|
|||||||
|
|
||||||
# now, we're going to take things down because aparently we this needs to be re-exececuted.
|
# now, we're going to take things down because aparently we this needs to be re-exececuted.
|
||||||
ssh "$FQDN" "bash -c $BTCPAY_SERVER_APPPATH/btcpay-down.sh"
|
ssh "$FQDN" "bash -c $BTCPAY_SERVER_APPPATH/btcpay-down.sh"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "ERROR: File does not exist."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -61,9 +61,8 @@ else
|
|||||||
if [ -d "$DATA_PATH" ]; then
|
if [ -d "$DATA_PATH" ]; then
|
||||||
COMPLETE_FILE_PATH="$DATA_PATH/complete"
|
COMPLETE_FILE_PATH="$DATA_PATH/complete"
|
||||||
if lxc exec "$BASE_IMAGE_VM_NAME" -- [ ! -f "$COMPLETE_FILE_PATH" ]; then
|
if lxc exec "$BASE_IMAGE_VM_NAME" -- [ ! -f "$COMPLETE_FILE_PATH" ]; then
|
||||||
lxc file push --recursive --project=default "$DATA_PATH/" "$BASE_IMAGE_VM_NAME""$DATA_PATH/"
|
lxc file push --recursive --uid=999 --guid=999 --project=default "$DATA_PATH/" "$BASE_IMAGE_VM_NAME/home/ubuntu/.ss/cache/bitcoin/$CHAIN/$DATA/"
|
||||||
lxc exec "$BASE_IMAGE_VM_NAME" -- su ubuntu - bash -c "echo $(date) > $COMPLETE_FILE_PATH"
|
lxc exec "$BASE_IMAGE_VM_NAME" -- su ubuntu - bash -c "echo $(date) > $COMPLETE_FILE_PATH"
|
||||||
lxc exec "$BASE_IMAGE_VM_NAME" -- chown -R 999:999 "$DATA_PATH/$DATA"
|
|
||||||
else
|
else
|
||||||
echo "INFO: it appears as though $CHAIN/$DATA has already been initialized. Continuing."
|
echo "INFO: it appears as though $CHAIN/$DATA has already been initialized. Continuing."
|
||||||
fi
|
fi
|
||||||
|
@ -134,12 +134,7 @@ for i in "$@"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$RESTORE_BTCPAY" = true ] && [ -z "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
|
if [ "$RESTORE_BTCPAY" = true ] && [ -z "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
|
||||||
echo "ERROR: Use the '--backup-archive-path=/path/to/btcpay/archive.tar.gz' option when restoring btcpay server."
|
echo "ERROR: BACKUP_BTCPAY_ARCHIVE_PATH was not set event when the RESTORE_BTCPAY = true. "
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RESTORE_BTCPAY" = true ] && [ ! -f "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
|
|
||||||
echo "ERROR: The backup archive path you specified DOES NOT exist!"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ if ! lxc list --format csv | grep -q "$LXD_VM_NAME"; then
|
|||||||
lxc config set "$LXD_VM_NAME" "volatile.enp5s0.hwaddr=$MAC_ADDRESS_TO_PROVISION"
|
lxc config set "$LXD_VM_NAME" "volatile.enp5s0.hwaddr=$MAC_ADDRESS_TO_PROVISION"
|
||||||
lxc config device override "$LXD_VM_NAME" root size="${ROOT_DISK_SIZE_GB}GB"
|
lxc config device override "$LXD_VM_NAME" root size="${ROOT_DISK_SIZE_GB}GB"
|
||||||
|
|
||||||
# # attach any volumes
|
# of chainstate/blocks.
|
||||||
# for CHAIN in testnet mainnet; do
|
# for CHAIN in testnet mainnet; do
|
||||||
# for DATA in blocks chainstate; do
|
# for DATA in blocks chainstate; do
|
||||||
# MOUNT_PATH="/$CHAIN/$DATA"
|
# MOUNT_PATH="/$CHAIN/$DATA"
|
||||||
|
@ -22,7 +22,7 @@ mkdir -p "$SSHFS_PATH"
|
|||||||
sshfs "$PRIMARY_WWW_FQDN:$REMOTE_BACKUP_PATH" "$SSHFS_PATH"
|
sshfs "$PRIMARY_WWW_FQDN:$REMOTE_BACKUP_PATH" "$SSHFS_PATH"
|
||||||
|
|
||||||
# rsync the files from the remote server to our local backup path.
|
# rsync the files from the remote server to our local backup path.
|
||||||
rsync -av "$SSHFS_PATH/" "$LOCAL_BACKUP_PATH"
|
rsync -av "$SSHFS_PATH/" "$LOCAL_BACKUP_PATH/"
|
||||||
|
|
||||||
# step 4: unmount the SSHFS filesystem and cleanup.
|
# step 4: unmount the SSHFS filesystem and cleanup.
|
||||||
umount "$SSHFS_PATH"
|
umount "$SSHFS_PATH"
|
||||||
|
@ -76,7 +76,7 @@ done
|
|||||||
# TODO check if there are any other stacks that are left running (other than reverse proxy)
|
# TODO check if there are any other stacks that are left running (other than reverse proxy)
|
||||||
# if so, this may mean the user has disabled one or more domains and that existing sites/services
|
# if so, this may mean the user has disabled one or more domains and that existing sites/services
|
||||||
# are still running. We should prompt the user of this and quit. They have to go manually docker stack remove these.
|
# are still running. We should prompt the user of this and quit. They have to go manually docker stack remove these.
|
||||||
if [[ $(docker stack list | wc -l) -gt 2 ]]; then
|
if [[ $(docker stack ls | wc -l) -gt 2 ]]; then
|
||||||
echo "WARNING! You still have stacks running. If you have modified the SITES list, you may need to go remove the docker stacks runnong the remote machine."
|
echo "WARNING! You still have stacks running. If you have modified the SITES list, you may need to go remove the docker stacks runnong the remote machine."
|
||||||
echo "exiting."
|
echo "exiting."
|
||||||
exit 1
|
exit 1
|
||||||
@ -90,7 +90,7 @@ if [ "$RESTART_FRONT_END" = true ]; then
|
|||||||
if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
|
if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
docker stack down reverse-proxy
|
docker stack rm reverse-proxy
|
||||||
|
|
||||||
# wait for all docker containers to stop.
|
# wait for all docker containers to stop.
|
||||||
# TODO see if there's a way to check for this.
|
# TODO see if there's a way to check for this.
|
||||||
|
@ -20,7 +20,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
|||||||
STACK_NAME="$DOMAIN_IDENTIFIER-$APP-$LANGUAGE_CODE"
|
STACK_NAME="$DOMAIN_IDENTIFIER-$APP-$LANGUAGE_CODE"
|
||||||
|
|
||||||
if docker stack list --format "{{.Name}}" | grep -q "$STACK_NAME"; then
|
if docker stack list --format "{{.Name}}" | grep -q "$STACK_NAME"; then
|
||||||
docker stack down "$STACK_NAME"
|
docker stack rm "$STACK_NAME"
|
||||||
sleep 2
|
sleep 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user