From 7473b498a9b55f64e4f3de5a4941aa28d9d9c9e2 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Tue, 16 Apr 2019 23:38:59 +0100 Subject: [PATCH] 80scanLND handles bitcoin info --- home.admin/00raspiblitz.sh | 17 +++++------------ home.admin/80scanLND.sh | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index e7d23779..df352d65 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -229,19 +229,12 @@ To run a BACKUP of funds & channels first is recommended. echo "${network} error: ${clienterror}" fi - # normal info - boxwidth=40 - l1="Waiting for ${network}d to get ready.\n" - l2="---> ${clienterror/error*:/}\n" - l3="Can take longer if device was off." - uptimeSeconds="$(cat /proc/uptime | grep -o '^[0-9]\+')" - # after 2 min show complete long string (full detail) - if [ ${uptimeSeconds} -gt 120 ]; then - boxwidth=80 - l2="${clienterror}\n" - l3="CTRL+C => terminal" + # let 80scanLND script to the info to use + /home/admin/80scanLND.sh + if [ $? -gt 0 ]; then + exit 0 fi - dialog --backtitle "RaspiBlitz ${localip} - Welcome" --infobox "$l1$l2$l3" 5 ${boxwidth} + else locked=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net getinfo 2>&1 | grep -c unlock) if [ ${locked} -gt 0 ]; then diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index 72e814be..deca55f8 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -17,7 +17,7 @@ if [ ${bitcoinActive} -eq 0 ]; then # On Bitcoin Error #################### - height=6 + height=5 width=42 title="Blockchain Info" if [ ${uptime} -gt 300 ]; then