raspiblitz/home.admin/80scanLND.sh

73 lines
1.8 KiB
Bash
Raw Normal View History

2019-02-02 23:49:04 +01:00
#!/bin/bash
2019-04-16 22:00:49 +01:00
source /home/admin/_version.info
2019-02-02 23:49:04 +01:00
source /home/admin/raspiblitz.info
2019-02-05 18:24:33 +01:00
source /mnt/hdd/raspiblitz.conf
2018-08-24 00:11:33 +02:00
2019-04-16 21:48:22 +01:00
source <(sudo /home/admin/config.scripts/blitz.statusscan.sh)
2019-04-16 22:07:59 +01:00
adminStr="ssh admin@${localIP} ->Password A"
if [ "$USER" == "admin" ]; then
adminStr="Use CTRL+c to EXIT to Terminal"
fi
2018-08-02 18:45:09 +02:00
2019-04-16 22:23:06 +01:00
if [ ${bitcoinActive} -eq 0 ]; then
####################
# On Bitcoin Error
####################
height=6
width=42
2019-04-16 22:58:59 +01:00
title="Blockchain Warning"
infoStr=" The ${network}d service is not running.\n Login for more details."
2019-04-16 22:23:06 +01:00
if [ "$USER" == "admin" ]; then
infoStr="${infoStr}\n${bitcoinError}"
fi
elif [ ${lndActive} -eq 0 ]; then
####################
# On LND Error
####################
2019-04-16 22:58:59 +01:00
height=5
2019-04-16 22:23:06 +01:00
width=42
2019-04-16 22:58:59 +01:00
title="Lightning Warning"
infoStr=" The lnd service is not running.\n Login for more details."
2019-04-16 22:23:06 +01:00
if [ "$USER" == "admin" ]; then
2019-04-16 22:58:59 +01:00
clear
echo "*********************************"
echo "* The lnd service is not running."
echo "*********************************"
echo ${lndError}
echo "Use following command to debug:"
echo "/home/admin/XXdebugLogs.sh"
exit 0
2019-04-16 22:23:06 +01:00
fi
else
####################
# Sync Progress
####################
# basic dialog info
height=6
width=42
2019-04-16 22:24:01 +01:00
title="Node is Syncing (${scriptRuntime})"
2019-04-16 22:23:06 +01:00
# format progress values
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"
fi
# display info to user
2019-04-16 22:08:55 +01:00
dialog --title " ${title} " --backtitle "RaspiBlitz ${codeVersion} ${hostname} / ${network} / ${chain} / ${tempCelsius}°C" --infobox "${infoStr}\n ${adminStr}" ${height} ${width}