mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
LCD restart infos
This commit is contained in:
parent
164907b5f5
commit
8fa39a8031
2 changed files with 19 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue