Update error checking during btcpay restore.

This commit is contained in:
Derek Smith 2023-03-19 13:43:10 -04:00
parent bc4ac89c19
commit 70608d41f2
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 6 additions and 5 deletions

View File

@ -26,8 +26,4 @@ if [ -f "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
# 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"
else
echo "ERROR: File does not exist."
exit 1
fi

View File

@ -134,7 +134,12 @@ for i in "$@"; do
done
if [ "$RESTORE_BTCPAY" = true ] && [ -z "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
echo "ERROR: BACKUP_BTCPAY_ARCHIVE_PATH was not set event when the RESTORE_BTCPAY = true. "
echo "ERROR: Use the '--backup-archive-path=/path/to/btcpay/archive.tar.gz' option when restoring btcpay server."
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
fi