add the SYSTEM menu for parallel chains

This commit is contained in:
openoms 2021-06-28 11:48:36 +01:00
parent 53d4d90b34
commit 7284a25479
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65
2 changed files with 19 additions and 9 deletions

View File

@ -92,7 +92,7 @@ OPTIONS+=(SERVICES "Additional Apps & Services on ${CHAIN}")
HEIGHT=$((HEIGHT+1))
CHOICE_HEIGHT=$((CHOICE_HEIGHT+1))
fi
#TODO OPTIONS+=(SYSTEM "Monitoring & Configuration")
OPTIONS+=(SYSTEM "Monitoring & Configuration")
#TODO OPTIONS+=(CONNECT "Connect Apps & Show Credentials")
if [ $nonDefaultLNtype = 1 ];then

View File

@ -5,6 +5,9 @@ echo "get raspiblitz config"
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# source <(/home/admin/config.scripts/network.aliases.sh getvars <lnd|cln> <mainnet|testnet|signet>)
source <(/home/admin/config.scripts/network.aliases.sh getvars $1 $2)
# BASIC MENU INFO
HEIGHT=12 # add 6 to CHOICE_HEIGHT + MENU lines
WIDTH=64
@ -39,26 +42,33 @@ CHOICE=$(dialog --clear \
case $CHOICE in
${network}LOG)
if [ ${CHAIN} = signet ]; then
bitcoinlogpath="sudo tail -f /mnt/hdd/bitcoin/signet/debug.log"
elif [ ${CHAIN} = testnet ]; then
bitcoinlogpath="sudo tail -f /mnt/hdd/bitcoin/testnet3/debug.log"
elif [ ${CHAIN} = mainnet ]; then
bitcoinlogpath="sudo tail -f /mnt/hdd/bitcoin/debug.log"
fi
clear
echo
echo "Will follow the /mnt/hdd/${network}/debug.log"
echo "running: 'sudo tail -n 30 -f /mnt/hdd/${network}/debug.log'"
echo "Will follow the ${bitcoinlogpath}"
echo "running: 'sudo tail -n 30 -f ${bitcoinlogpath}'"
echo
echo "Press ENTER to continue"
echo "use CTRL+C any time to abort .. then use command 'raspiblitz' to return to menu"
echo "###############################################################################"
read key
sudo tail -n 30 -f /mnt/hdd/${network}/debug.log;;
sudo tail -n 30 -f ${bitcoinlogpath};;
${network}CONF)
if /home/admin/config.scripts/blitz.setconf.sh "/mnt/hdd/${network}/${network}.conf" "root"
then
whiptail \
--title "Restart" --yes-button "Restart" --no-button "Not now" \
--yesno "To apply the new settings ${network}d needs to restart.
Do you want to restart ${network}d now?" 10 55
--yesno "To apply the new settings ${netprefix}${network}d needs to restart.
Do you want to restart ${netprefix}${network}d now?" 10 55
if [ $? -eq 0 ]; then
echo "# Restarting ${network}d"
sudo systemctl restart ${network}d
echo "# Restarting ${netprefix}${network}d"
sudo systemctl restart ${netprefix}${network}d
else
echo "# Continue without restarting."
fi
@ -77,7 +87,7 @@ case $CHOICE in
read key
sudo tail -n 30 -f /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log;;
LNDCONF)
if /home/admin/config.scripts/blitz.setconf.sh "/mnt/hdd/lnd/lnd.conf" "root"
if /home/admin/config.scripts/blitz.setconf.sh "/mnt/hdd/lnd/${netprefix}lnd.conf" "root"
then
whiptail \
--title "Restart" --yes-button "Restart" --no-button "Not now" \