diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index f763061..f437cb5 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -124,17 +124,28 @@ else height=6 width=43 title="Node is Syncing (${scriptRuntime})" + actionString="Please wait - this can take some time" # formatting progress values if [ ${#syncProgress} -eq 0 ]; then - syncProgress="waiting" + if [ ${startcountBlockchain} -eq 0 ]; then + syncProgress="waiting" + else + syncProgress="${startcountBlockchain} restarts" + actionString="Please SSH in for more detail:" + fi elif [ ${#syncProgress} -lt 6 ]; then syncProgress=" ${syncProgress} %" else syncProgress="${syncProgress} %" fi if [ ${#scanProgress} -eq 0 ]; then - scanProgress="waiting" + if [ ${startcountLightning} -eq 0 ]; then + scanProgress="waiting" + else + scanProgress="${startcountLightning} restarts" + actionString="Please SSH in for more detail:" + fi elif [ ${#scanProgress} -lt 6 ]; then scanProgress=" ${scanProgress} %" else @@ -142,7 +153,7 @@ else fi # setting info string - infoStr=" Blockchain Progress : ${syncProgress}\n Lightning Progress : ${scanProgress}\n Please wait - this can take some time" + infoStr=" Blockchain Progress : ${syncProgress}\n Lightning Progress : ${scanProgress}\n ${actionString}" fi diff --git a/home.admin/config.scripts/blitz.statusscan.sh b/home.admin/config.scripts/blitz.statusscan.sh index 0e124e1..315b200 100644 --- a/home.admin/config.scripts/blitz.statusscan.sh +++ b/home.admin/config.scripts/blitz.statusscan.sh @@ -29,13 +29,9 @@ uptime=$(awk '{printf("%d\n",$1 + 0.5)}' /proc/uptime) echo "uptime=${uptime}" # count restarts of bitcoind/litecoind -startcountBlockchain=$(cat systemd.blockchain.log | grep -c "STARTED") +startcountBlockchain=$(cat systemd.blockchain.log 2>/dev/null | grep -c "STARTED") echo "startcountBlockchain=${startcountBlockchain}" -# count restarts of bitcoind/litecoind -startcountLightning=$(cat systemd.lightning.log | grep -c "STARTED") -echo "startcountLightning=${startcountLightning}" - # is bitcoind running bitcoinRunning=$(systemctl status ${network}d.service 2>/dev/null | grep -c running) echo "bitcoinActive=${bitcoinRunning}" @@ -111,11 +107,12 @@ else fi +# count restarts of bitcoind/litecoind +startcountLightning=$(cat systemd.lightning.log 2>/dev/null | grep -c "STARTED") +echo "startcountLightning=${startcountLightning}" + # is LND running lndRunning=$(systemctl status lnd.service 2>/dev/null | grep -c running) - -# TODO: check how long running ... try to find out if problem on starting - echo "lndActive=${lndRunning}" if [ ${lndRunning} -eq 1 ]; then