diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index e6e525415..8e58ea3de 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -39,6 +39,9 @@ fi if [ "${rtlWebinterface}" == "on" ]; then OPTIONS+=(RTL "RTL Web Node Manager") fi +if [ "${BTCPayServer}" == "on" ]; then + OPTIONS+=(BTCPAY "BTCPay Server Info") +fi if [ "${ElectRS}" == "on" ]; then OPTIONS+=(ELECTRS "Electrum Rust Server") fi @@ -139,6 +142,10 @@ case $CHOICE in /home/admin/config.scripts/bonus.rtl.sh menu ./00mainMenu.sh ;; + ELECTRS) + /home/admin/config.scripts/bonus.btcpayserver.sh menu + ./00mainMenu.sh + ;; ELECTRS) /home/admin/config.scripts/bonus.electrs.sh menu ./00mainMenu.sh diff --git a/home.admin/config.scripts/bonus.btcpayserver.sh b/home.admin/config.scripts/bonus.btcpayserver.sh index ae7f24781..9ee786f67 100644 --- a/home.admin/config.scripts/bonus.btcpayserver.sh +++ b/home.admin/config.scripts/bonus.btcpayserver.sh @@ -11,6 +11,38 @@ fi source /mnt/hdd/raspiblitz.conf +# show info menu +if [ "$1" = "menu" ]; then + + # get network info + localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') + toraddress=$(sudo cat /mnt/hdd/tor/btcpay/hostname 2>/dev/null) + + if [ ${#toraddress} -gt 0 ]; then + + # TOR + /home/admin/config.scripts/blitz.lcd.sh qr "${toraddress}" + whiptail --title " BTCPay Server (TOR) " --msgbox "Open the following URL in your local web browser: +https://${localip}:23000 +You need to accept the selfsigned certificate in browser.\n +Hidden Service address for TOR Browser (QR see LCD): +${toraddress} +" 12 67 + /home/admin/config.scripts/blitz.lcd.sh hide + else + + # IP + Domain + whiptail --title " BTCPay Server (Domain) " --msgbox "Open the following URL in your local web browser: +https://${localip}:23000\n +To make BTCPay reachable from the outside see 'BTCPay' +in README of https://github.com/rootzoll/raspiblitz +" 11 67 + fi + + echo "please wait ..." + exit 0 +fi + # add default value to raspi config if needed if ! grep -Eq "^BTCPayServer=" /mnt/hdd/raspiblitz.conf; then echo "BTCPayServer=off" >> /mnt/hdd/raspiblitz.conf diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index 0f9bc2f69..5fa1c7096 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -18,20 +18,29 @@ fi # show info menu if [ "$1" = "menu" ]; then + + # get network info localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') - torInfo="\nActivate TOR to access the web interface from outside your local network." toraddress=$(sudo cat /mnt/hdd/tor/RTL/hostname 2>/dev/null) + if [ "${runBehindTor}" = "on" ] && [ ${#toraddress} -gt 0 ]; then - torInfo="\nHidden Service address for TOR Browser (QR see LCD):\n${toraddress}" + # Info with TOR /home/admin/config.scripts/blitz.lcd.sh qr "${toraddress}" - fi - whiptail --title " Ride The Lightning (RTL)" --msgbox "Open the following URL in your local web browser: + 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. -${torInfo} +Use your Password B to login.\n +Hidden Service address for TOR Browser (QR see LCD):\n${toraddress} " 12 67 + /home/admin/config.scripts/blitz.lcd.sh hide + else + # Info without TOR + 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 +Activate TOR to access the web interface from outside your local network. +" 12 57 + fi echo "please wait ..." - /home/admin/config.scripts/blitz.lcd.sh hide exit 0 fi