From 3fdfd4c4b7fdaf16976ecd536c830c1bcc0929f3 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Mon, 23 Nov 2020 21:27:39 +0100 Subject: [PATCH] #1758 improve warning when Sphinx IP2TOR is not ready yet (#1796) --- home.admin/config.scripts/bonus.btcpayserver.sh | 9 ++++++++- home.admin/config.scripts/bonus.lnbits.sh | 9 ++++++++- home.admin/config.scripts/bonus.sphinxrelay.sh | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/bonus.btcpayserver.sh b/home.admin/config.scripts/bonus.btcpayserver.sh index e00523c50..058dbdb3d 100755 --- a/home.admin/config.scripts/bonus.btcpayserver.sh +++ b/home.admin/config.scripts/bonus.btcpayserver.sh @@ -99,8 +99,15 @@ if [ "$1" = "menu" ]; then exit 0 fi + # display possible problems with IP2TOR setup if [ ${#ip2torWarn} -gt 0 ]; then - whiptail --title " Warning " --msgbox "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: https://${localIP}:${httpsPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 13 72 + whiptail --title " Warning " \ + --yes-button "Back" \ + --no-button "Continue Anyway" \ + --yesno "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: https://${localIP}:${httpsPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 14 72 + if [ "$?" != "1" ]; then + exit 0 + fi fi text="Local Webrowser: https://${localIP}:${httpsPort}" diff --git a/home.admin/config.scripts/bonus.lnbits.sh b/home.admin/config.scripts/bonus.lnbits.sh index 3caed7362..c7c674cc2 100755 --- a/home.admin/config.scripts/bonus.lnbits.sh +++ b/home.admin/config.scripts/bonus.lnbits.sh @@ -22,8 +22,15 @@ if [ "$1" = "menu" ]; then echo "# collecting status info ... (please wait)" source <(sudo /home/admin/config.scripts/bonus.lnbits.sh status) + # display possible problems with IP2TOR setup if [ ${#ip2torWarn} -gt 0 ]; then - whiptail --title " Warning " --msgbox "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: https://${localIP}:${httpsPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 13 72 + whiptail --title " Warning " \ + --yes-button "Back" \ + --no-button "Continue Anyway" \ + --yesno "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: https://${localIP}:${httpsPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 14 72 + if [ "$?" != "1" ]; then + exit 0 + fi fi text="Local Webrowser: https://${localIP}:${httpsPort}" diff --git a/home.admin/config.scripts/bonus.sphinxrelay.sh b/home.admin/config.scripts/bonus.sphinxrelay.sh index 905c5c960..a319d1252 100755 --- a/home.admin/config.scripts/bonus.sphinxrelay.sh +++ b/home.admin/config.scripts/bonus.sphinxrelay.sh @@ -21,8 +21,15 @@ if [ "$1" = "menu" ]; then echo "# collecting status info ... (please wait)" source <(sudo /home/admin/config.scripts/bonus.sphinxrelay.sh status) + # display possible problems with IP2TOR setup if [ ${#ip2torWarn} -gt 0 ]; then - whiptail --title " Warning " --msgbox "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: http://${localIP}:${httpPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 14 72 + whiptail --title " Warning " \ + --yes-button "Back" \ + --no-button "Continue Anyway" \ + --yesno "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: http://${localIP}:${httpPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 14 72 + if [ "$?" != "1" ]; then + exit 0 + fi fi extraPairInfo=""