From 1c57fee8482807d9fbbb1200cf8b722393c82b6d Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 21 Dec 2021 00:38:51 +0100 Subject: [PATCH] #2639 check if wallet exists from resacue file --- home.admin/_provision.setup.sh | 8 +++++++- home.admin/config.scripts/bitcoin.monitor.sh | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/home.admin/_provision.setup.sh b/home.admin/_provision.setup.sh index 85ec25d79..498b18f82 100755 --- a/home.admin/_provision.setup.sh +++ b/home.admin/_provision.setup.sh @@ -242,8 +242,14 @@ if [ "${lightning}" == "lnd" ]; then fi fi + # WALLET --> FROM RESCUEFILE + if [ $(sudo -u bitcoin ls /mnt/hdd/lnd/data/chain/bitcoin/mainnet/wallet.db 2>/dev/null | grep -c wallet.db) -gt 0 ]; then + + # OK no further action needed + echo "WALLET --> FROM RESCUEFILE " >> ${logFile} + # WALLET --> SEED + SCB - if [ "${seedWords}" != "" ] && [ "${staticchannelbackup}" != "" ]; then + elif [ "${seedWords}" != "" ] && [ "${staticchannelbackup}" != "" ]; then echo "WALLET --> SEED + SCB " >> ${logFile} /home/admin/_cache.sh set message "LND Wallet (SEED & SCB)" diff --git a/home.admin/config.scripts/bitcoin.monitor.sh b/home.admin/config.scripts/bitcoin.monitor.sh index c0fc1470b..f7d0bc40d 100755 --- a/home.admin/config.scripts/bitcoin.monitor.sh +++ b/home.admin/config.scripts/bitcoin.monitor.sh @@ -225,11 +225,10 @@ if [ "$2" = "peer-kickstart" ]; then fi # if auto then determine whats running if [ "${addressFormat}" == "auto" ]; then - source <() if [ "$(cat /mnt/hdd/raspiblitz.conf | grep -c "^runBehindTor=on")" != "0" ]; then addressFormat="tor" else - source <(sudo ./config.scripts/internet.sh status global) + source <(sudo /home/admin/config.scripts/internet.sh status global) if [ "${ipv6}" == "off" ]; then addressFormat="ipv4" else