mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-22 16:10:55 +02:00
2089 check one channel & use wget for local test (#2112)
This commit is contained in:
@@ -211,7 +211,7 @@ The following additional information is available:
|
|||||||
|
|
||||||
# trigger restart of relevant services so they can pickup new environment
|
# trigger restart of relevant services so they can pickup new environment
|
||||||
print("# restarting Sphinx Relay to pickup new public url (please wait) ...")
|
print("# restarting Sphinx Relay to pickup new public url (please wait) ...")
|
||||||
os.system("sudo systemctl restart sphinxrelay")
|
os.system("sudo systemctl restart sphinxrelay 2>/dev/null")
|
||||||
time.sleep(8)
|
time.sleep(8)
|
||||||
|
|
||||||
# loop until no more subscriptions or user chooses CANCEL on subscription list
|
# loop until no more subscriptions or user chooses CANCEL on subscription list
|
||||||
|
@@ -96,6 +96,7 @@ MAINMENU > SUBSCRIBE > IP2TOR > SPHINX"
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check that IP2TOR has also a LetsEncrypt Cert
|
||||||
if [ "${connection}" = "ip2tor&selfsigned" ]; then
|
if [ "${connection}" = "ip2tor&selfsigned" ]; then
|
||||||
text="OK you now have an IP2Tor connection running - thats great!\n
|
text="OK you now have an IP2Tor connection running - thats great!\n
|
||||||
BUT TO MAKE THIS WORK:\n
|
BUT TO MAKE THIS WORK:\n
|
||||||
@@ -106,6 +107,7 @@ It needs an additional Domain with LetsEncrypt certificate for HTTPS: Go MAINMEN
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check that not more than one app is connected
|
||||||
if [ "${connectionApp}" != "0" ]; then
|
if [ "${connectionApp}" != "0" ]; then
|
||||||
text="There is already one app connected to the Sphinx-Relay.
|
text="There is already one app connected to the Sphinx-Relay.
|
||||||
There CANNOT BE MORE THAN ONE APP connected at the same time.\n
|
There CANNOT BE MORE THAN ONE APP connected at the same time.\n
|
||||||
@@ -119,6 +121,13 @@ ${publicURL}"
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check that at least one channel is open
|
||||||
|
openChannels=$(sudo -u bitcoin lncli listchannels | grep -c "channel_point")
|
||||||
|
if [ "${openChannels}" == "0" ]; then
|
||||||
|
whiptail --title " Warning " --msgbox "You need at least one open channel to the lightning network for sphinx to work." 10 32
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${#extraPairInfo} -eq 0 ]; then
|
if [ ${#extraPairInfo} -eq 0 ]; then
|
||||||
extraPairInfo="The base64 decoded connection string (for debug):\n${connectionCodeClear}"
|
extraPairInfo="The base64 decoded connection string (for debug):\n${connectionCodeClear}"
|
||||||
fi
|
fi
|
||||||
@@ -294,7 +303,7 @@ if [ "$1" = "status" ]; then
|
|||||||
|
|
||||||
# test connection (accept self-signed certs here) ... calling the url /app should return INDEX
|
# test connection (accept self-signed certs here) ... calling the url /app should return INDEX
|
||||||
connectionTest="n/a"
|
connectionTest="n/a"
|
||||||
connectionResponse=$(curl --insecure ${publicURL}/app 2>/dev/null)
|
connectionResponse=$(wget -qO- ${publicURL}/app 2>/dev/null)
|
||||||
if [ "${connectionResponse}" == "INDEX" ]; then
|
if [ "${connectionResponse}" == "INDEX" ]; then
|
||||||
connectionTest="OK"
|
connectionTest="OK"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user