From 18ef1d2d462feccf32044bd69d81f732a495c063 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 12 Nov 2019 22:12:32 +0900 Subject: [PATCH] Add warning message after load-utxo-set if bitcoin core wallet exists --- contrib/FastSync/load-utxo-set.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/FastSync/load-utxo-set.sh b/contrib/FastSync/load-utxo-set.sh index f1c5ccd..72e15f1 100755 --- a/contrib/FastSync/load-utxo-set.sh +++ b/contrib/FastSync/load-utxo-set.sh @@ -97,4 +97,12 @@ BTCPAY_DATA_DIR="/var/lib/docker/volumes/generated_btcpay_datadir/_data" [ ! -d "$BTCPAY_DATA_DIR" ] && mkdir -p "$BTCPAY_DATA_DIR" echo "$TAR_NAME" > "$BTCPAY_DATA_DIR/FastSynced" -echo "Successfully downloaded and extracted, you can run btcpay again (btcpay-up.sh)" \ No newline at end of file +echo "Successfully downloaded and extracted." + +if ! docker volume inspect generated_bitcoin_wallet_datadir &>/dev/null; then + echo -e '\033[33mWARNING: You need to delete your Bitcoin Core wallet before restarting with "btcpay-up.sh", or bitcoin core will fail to start.\033[0m' + echo -e '\033[33mDo not delete the wallet if you have any funds on it. (For example, this may be the case if you use Eclair or FullyNoded to receive funds)\033[0m' + echo -e '\033[33mHow to proceed: If you agree to delete your Bitcoin Core wallet, run "docker volume rm generated_bitcoin_wallet_datadir"\033[0m' +else + echo "You can now run btcpay again (btcpay-up.sh)" +fi \ No newline at end of file