diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index f35afbf..cca5ced 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -1,16 +1,23 @@ #!/bin/bash +source /home/admin/_version.info source /home/admin/raspiblitz.info source /mnt/hdd/raspiblitz.conf source <(sudo /home/admin/config.scripts/blitz.statusscan.sh) -height=6 +height=8 width=52 #infoStr=" Waiting for Blockchain Sync\n Progress: ${syncProgress}% \n Please wait - this can take some time.\n ssh admin@${localIP} -> Password A" -infoStr=" Node is Syncing\n Blockchain Progress : ${scanProgress}%\n Lightning Progress : ${scanProgress}%\n Please wait - this can take some time\n ssh admin@${localIP} ->Password A" +title="Node is Syncing" +if [ ${#syncProgress} -lt 6 ]; then + syncProgress=" ${syncProgress}" +fi +if [ ${#scanProgress} -lt 6 ]; then + scanProgress=" ${scanProgress}" +fi +infoStr=" Blockchain Progress : ${syncProgress}%\n Lightning Progress : ${scanProgress}%\n Please wait - this can take some time\n ssh admin@${localIP} ->Password A" # display progress to user -temp=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc) -dialog --title " ${network} / ${chain} " --backtitle "RaspiBlitz (${hostname}) CPU: ${temp}°C" --infobox "${infoStr}" ${height} ${width} \ No newline at end of file +dialog --title " ${title} " --backtitle "RaspiBlitz ${codeVersion} (${hostname}) / ${network} / ${chain} / CPU: ${tempCelsius}°C" --infobox "${infoStr}" ${height} ${width} \ No newline at end of file diff --git a/home.admin/config.scripts/blitz.statusscan.sh b/home.admin/config.scripts/blitz.statusscan.sh index 0d1ce6f..0f88a3b 100644 --- a/home.admin/config.scripts/blitz.statusscan.sh +++ b/home.admin/config.scripts/blitz.statusscan.sh @@ -20,6 +20,10 @@ sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') echo "localIP='${localip}'" +# temp +tempC=$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc) +echo "tempCelsius='${tempC}'" + # is bitcoind running bitcoinRunning=$(systemctl status ${network}d.service 2>/dev/null | grep -c running) echo "bitcoinActive=${bitcoinRunning}"