From b715db5f3675997ea39858bb25e154701534d8ae Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 5 Dec 2018 15:21:08 +0100 Subject: [PATCH] update to new config --- home.admin/BBconnectPeer.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/home.admin/BBconnectPeer.sh b/home.admin/BBconnectPeer.sh index 2dac7a6..3d9734f 100755 --- a/home.admin/BBconnectPeer.sh +++ b/home.admin/BBconnectPeer.sh @@ -2,9 +2,13 @@ _temp="./download/dialog.$$" _error="./.error.out" -# load network and chain info -network=`cat .network` -chain=$(sudo -bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain') +# load raspiblitz config data (with backup from old config) +source /mnt/hdd/raspiblitz.conf 2>/dev/null +if [ ${#network} -eq 0 ]; then network=`cat .network`; fi +if [ ${#chain} -eq 0 ]; then + echo "gathering chain info ... please wait" + chain=$(${network}-cli getblockchaininfo | jq -r '.chain') +fi # set ntwork map info networkMap="https://lnmainnet.gaben.win"