raspiblitz/home.admin/00parallelChainsMenu.sh

72 lines
2 KiB
Bash
Raw Normal View History

2021-05-22 11:30:56 +01:00
#!/bin/bash
2021-08-31 13:27:35 +02:00
# For now just list all testnet/signet options available
# injecting specific perspectives can be done later
2021-05-22 11:30:56 +01:00
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
# get the local network IP to be displayed on the LCD
source <(/home/admin/config.scripts/internet.sh status local)
# BASIC MENU INFO
WIDTH=64
2021-08-31 13:27:35 +02:00
BACKTITLE="RaspiBlitz"
TITLE=" Testnet/Signet Options "
2021-05-22 11:30:56 +01:00
MENU="Choose one of the following options:"
OPTIONS=()
plus=""
2021-08-31 13:27:35 +02:00
if [ "${testnet}" == "on" ]; then
OPTIONS+=(tSYS "TESTNET Monitoring & Configuration")
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then OPTIONS+=(tLND "TESTNET LND Wallet Options"); fi
if [ "${lightning}" == "cln" ] || [ "${cln}" == "on" ]; then OPTIONS+=(tCLN "TESTNET C-Lightning Wallet Options"); fi
2021-05-22 11:30:56 +01:00
fi
2021-08-31 13:39:06 +02:00
# just an optical splitter - ignored on select
OPTIONS+=(--- "----------------------------------")
2021-08-31 13:37:53 +02:00
2021-08-31 13:27:35 +02:00
if [ "${signet}" == "on" ]; then
OPTIONS+=(sSYS "SIGNET Monitoring & Configuration")
if [ "${lightning}" == "cln" ] || [ "${cln}" == "on" ]; then OPTIONS+=(sCLN "SIGNET C-Lightning Wallet Options"); fi
2021-05-22 11:30:56 +01:00
fi
2021-08-31 13:27:35 +02:00
# DONT OFFER SERVICES FOR TESTNET RIGHT NOW
# OPTIONS+=(RTL "RTL Web Node Manager for LND ${CHAIN}")
# OPTIONS+=(SERVICES "Additional Apps & Services on ${CHAIN}")
2021-05-22 11:30:56 +01:00
2021-08-31 13:27:35 +02:00
# MAYBE LATER
# OPTIONS+=(CONNECT "Connect Apps & Show Credentials")
2021-05-22 11:30:56 +01:00
2021-08-16 16:41:23 +02:00
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT+6))
2021-05-22 11:30:56 +01:00
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--ok-label "Select" \
--cancel-label "Back" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
case $CHOICE in
2021-08-31 13:27:35 +02:00
tSYS)
/home/admin/99systemMenu.sh testnet
2021-05-22 11:30:56 +01:00
;;
2021-08-31 13:27:35 +02:00
sSYS)
/home/admin/99systemMenu.sh signet
2021-05-22 11:30:56 +01:00
;;
2021-08-31 13:27:35 +02:00
tLND)
/home/admin/99lndMenu.sh testnet
2021-05-22 11:30:56 +01:00
;;
2021-08-31 13:27:35 +02:00
sLND)
/home/admin/99lndMenu.sh signet
2021-05-22 11:30:56 +01:00
;;
2021-08-31 13:27:35 +02:00
tCLN)
/home/admin/99clnMenu.sh testnet
2021-05-22 11:30:56 +01:00
;;
2021-08-31 13:27:35 +02:00
sCLN)
/home/admin/99clnMenu.sh signet
2021-05-22 11:30:56 +01:00
;;
esac