mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 12:10:33 +02:00
use $lightning and $chain for status display
This commit is contained in:
@@ -20,7 +20,7 @@ function usage() {
|
|||||||
verbose=0
|
verbose=0
|
||||||
pause=12
|
pause=12
|
||||||
|
|
||||||
# this is used by touchscreen and command 'satus'
|
# this is used by touchscreen and command 'status'
|
||||||
# TODO: remove on v1.8
|
# TODO: remove on v1.8
|
||||||
while [[ "$1" == -* ]]; do
|
while [[ "$1" == -* ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -101,9 +101,9 @@ while :
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: ALSO SEPERATE GUI/ACTION FOR THE SCANNING / WALLET UNLOCK / ERROR DETECTION
|
# TODO: ALSO SEPARATE GUI/ACTION FOR THE SCANNING / WALLET UNLOCK / ERROR DETECTION
|
||||||
# if lightning is syncing or scanning
|
# if lightning is syncing or scanning
|
||||||
source <(sudo /home/admin/config.scripts/blitz.statusscan.sh)
|
source <(sudo /home/admin/config.scripts/blitz.statusscan.sh $lightning)
|
||||||
if [ "${syncedToChain}" != "1" ]; then
|
if [ "${syncedToChain}" != "1" ]; then
|
||||||
/home/admin/setup.scripts/eventBlockchainSync.sh lcd
|
/home/admin/setup.scripts/eventBlockchainSync.sh lcd
|
||||||
sleep 10
|
sleep 10
|
||||||
@@ -111,7 +111,7 @@ while :
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# no special case - show status display
|
# no special case - show status display
|
||||||
/home/admin/00infoBlitz.sh
|
/home/admin/00infoBlitz.sh $lightning ${chain}net
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
done
|
done
|
||||||
|
@@ -272,7 +272,7 @@ fi
|
|||||||
clnRunning=$(systemctl status ${netprefix}lightningd.service 2>/dev/null | grep -c running)
|
clnRunning=$(systemctl status ${netprefix}lightningd.service 2>/dev/null | grep -c running)
|
||||||
echo "clnActive=${clnRunning}"
|
echo "clnActive=${clnRunning}"
|
||||||
if [ ${clnRunning} -eq 1 ]; then
|
if [ ${clnRunning} -eq 1 ]; then
|
||||||
clnInfo=$(sudo -u bitcoin lightning-cli getinfo)
|
clnInfo=$($lightningcli_alias getinfo)
|
||||||
clnBlockHeight=$(echo "${clnInfo}" | jq -r '.blockheight' | tr -cd '[[:digit:]]')
|
clnBlockHeight=$(echo "${clnInfo}" | jq -r '.blockheight' | tr -cd '[[:digit:]]')
|
||||||
scanProgress=$(echo "scale=2; $clnBlockHeight*100/$total" | bc)
|
scanProgress=$(echo "scale=2; $clnBlockHeight*100/$total" | bc)
|
||||||
echo "scanProgress=${scanProgress}"
|
echo "scanProgress=${scanProgress}"
|
||||||
|
Reference in New Issue
Block a user