Browse Source

Better detection of bitcoin directory

dcg-latest
nicolas.dorier 5 years ago
parent
commit
3019dd71cb
No known key found for this signature in database GPG Key ID: 6618763EF09186FE
  1. 4
      contrib/FastSync/load-utxo-set.sh

4
contrib/FastSync/load-utxo-set.sh

@ -40,7 +40,9 @@ if ! [[ "$UTXO_DOWNLOAD_LINK" ]] && ! [[ "$TAR_FILE" ]]; then
exit 1 exit 1
fi fi
BITCOIN_DATA_DIR="$(docker volume inspect generated_bitcoin_datadir -f "{{.Mountpoint}}" 2>/dev/null)" || \
BITCOIN_DATA_DIR="/var/lib/docker/volumes/generated_bitcoin_datadir/_data" BITCOIN_DATA_DIR="/var/lib/docker/volumes/generated_bitcoin_datadir/_data"
[ ! -d "$BITCOIN_DATA_DIR" ] && mkdir -p "$BITCOIN_DATA_DIR" [ ! -d "$BITCOIN_DATA_DIR" ] && mkdir -p "$BITCOIN_DATA_DIR"
if [[ "$TAR_FILE" ]]; then if [[ "$TAR_FILE" ]]; then
@ -93,7 +95,9 @@ if ! tar -xf "$TAR_FILE" -C "$BITCOIN_DATA_DIR"; then
fi fi
$IS_DOWNLOADED && rm -f "$TAR_FILE" $IS_DOWNLOADED && rm -f "$TAR_FILE"
BTCPAY_DATA_DIR="$(docker volume inspect generated_btcpay_datadir -f "{{.Mountpoint}}" 2>/dev/null)" || \
BTCPAY_DATA_DIR="/var/lib/docker/volumes/generated_btcpay_datadir/_data" BTCPAY_DATA_DIR="/var/lib/docker/volumes/generated_btcpay_datadir/_data"
[ ! -d "$BTCPAY_DATA_DIR" ] && mkdir -p "$BTCPAY_DATA_DIR" [ ! -d "$BTCPAY_DATA_DIR" ] && mkdir -p "$BTCPAY_DATA_DIR"
echo "$TAR_NAME" > "$BTCPAY_DATA_DIR/FastSynced" echo "$TAR_NAME" > "$BTCPAY_DATA_DIR/FastSynced"

Loading…
Cancel
Save