diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 585634a1f..e6e525415 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -36,14 +36,17 @@ if [ "${rtlWebinterface}" == "on" ]; then fi # Put Activated Apps on top +if [ "${rtlWebinterface}" == "on" ]; then + OPTIONS+=(RTL "RTL Web Node Manager") +fi if [ "${ElectRS}" == "on" ]; then OPTIONS+=(ELECTRS "Electrum Rust Server") fi if [ "${lndmanage}" == "on" ]; then - OPTIONS+=(LNDMANAGE "LND Manage Info") + OPTIONS+=(LNDMANAGE "LND Manage Script") fi if [ "${lndmanage}" == "on" ]; then - OPTIONS+=(LOOP "Loop In/Out Info") + OPTIONS+=(LOOP "Loop In/Out Service") fi # Basic Options @@ -132,6 +135,10 @@ case $CHOICE in /home/admin/config.scripts/blitz.touchscreen.sh calibrate ./00mainMenu.sh ;; + RTL) + /home/admin/config.scripts/bonus.rtl.sh menu + ./00mainMenu.sh + ;; ELECTRS) /home/admin/config.scripts/bonus.electrs.sh menu ./00mainMenu.sh diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index 6ccc31850..d6c8391ea 100644 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -322,21 +322,7 @@ if [ "${rtlWebinterface}" != "${choice}" ]; then if [ "${choice}" = "on" ]; then if [ ${errorOnInstall} -eq 0 ]; then sudo systemctl start RTL - localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') - if [ "${runBehindTor}" = "on" ]; then - TOR_ADDRESS=$(sudo cat /mnt/hdd/tor/RTL/hostname) - whiptail --title " Installed RTL " --msgbox "\ -Open the following URL in your local web browser and login with your PASSWORD B.\n ----> http://${localip}:3000 \n -The Hidden Service address to be used in the Tor Browser is:\n -${TOR_ADDRESS} -" 14 66 - else - l1="Open the following URL in your local web browser" - l2="and login with your PASSWORD B." - l3="---> http://${localip}:3000" - dialog --title 'OK' --msgbox "${l1}\n${l2}\n${l3}\n${l4}" 7 65 - fi + /home/admin/config.scripts/bonus.rtl.sh menu else l1="!!! FAIL on RTL install !!!" l2="Try manual install on terminal after reboot with:" diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index 1d93ac337..186764adf 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -3,7 +3,7 @@ # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "small config script to switch WebGUI RideTheLightning on or off" - echo "bonus.rtl.sh [on|off]" + echo "bonus.rtl.sh [on|off|menu]" exit 1 fi @@ -17,6 +17,23 @@ if [ ${#network} -eq 0 ]; then fi +# show info menu +if [ "$1" = "menu" ]; then + localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') + torInfo="" + toraddress=$(sudo cat /mnt/hdd/tor/RTL/hostname) + if [ "${runBehindTor}" = "on" ] && [ ${#toraddress} -gt 0 ]; then + torInfo="The Hidden Service address for TOR Browser:\n${toraddress}" + fi + whiptail --title " Ride The Lightning (RTL)" --msgbox " +Open the following URL in your local web browser: +http://${localip}:3000 +Use your Password B to login.\n +${toraddress} +" 12 56 + exit 0 +fi + # add default value to raspi config if needed if ! grep -Eq "^rtlWebinterface=" /mnt/hdd/raspiblitz.conf; then echo "rtlWebinterface=off" >> /mnt/hdd/raspiblitz.conf