mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
2089 check one channel & use wget for local test (#2112)
This commit is contained in:
parent
b761e830d3
commit
945531bcda
2 changed files with 11 additions and 2 deletions
|
@ -211,7 +211,7 @@ The following additional information is available:
|
|||
|
||||
# trigger restart of relevant services so they can pickup new environment
|
||||
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)
|
||||
|
||||
# loop until no more subscriptions or user chooses CANCEL on subscription list
|
||||
|
|
|
@ -96,6 +96,7 @@ MAINMENU > SUBSCRIBE > IP2TOR > SPHINX"
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# check that IP2TOR has also a LetsEncrypt Cert
|
||||
if [ "${connection}" = "ip2tor&selfsigned" ]; then
|
||||
text="OK you now have an IP2Tor connection running - thats great!\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
|
||||
fi
|
||||
|
||||
# check that not more than one app is connected
|
||||
if [ "${connectionApp}" != "0" ]; then
|
||||
text="There is already one app connected to the Sphinx-Relay.
|
||||
There CANNOT BE MORE THAN ONE APP connected at the same time.\n
|
||||
|
@ -119,6 +121,13 @@ ${publicURL}"
|
|||
exit 0
|
||||
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
|
||||
extraPairInfo="The base64 decoded connection string (for debug):\n${connectionCodeClear}"
|
||||
fi
|
||||
|
@ -294,7 +303,7 @@ if [ "$1" = "status" ]; then
|
|||
|
||||
# test connection (accept self-signed certs here) ... calling the url /app should return INDEX
|
||||
connectionTest="n/a"
|
||||
connectionResponse=$(curl --insecure ${publicURL}/app 2>/dev/null)
|
||||
connectionResponse=$(wget -qO- ${publicURL}/app 2>/dev/null)
|
||||
if [ "${connectionResponse}" == "INDEX" ]; then
|
||||
connectionTest="OK"
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue