fix connection test

This commit is contained in:
rootzoll 2021-09-20 19:31:21 +02:00
parent 7d27ec6007
commit 3c7cb34eb9

View File

@ -335,7 +335,11 @@ if [ "$1" = "status" ]; then
# test connection (accept self-signed certs here) ... calling the url /app should return INDEX
connectionTest="n/a"
connectionResponse=$(wget --no-check-certificate -qO- ${publicURL}/app 2>/dev/null)
if [ "${sphinxrelay_connection}" == "tor" ]; then
connectionResponse=$(torsocks wget --no-check-certificate -qO- ${publicURL}/app 2>/dev/null)
else
connectionResponse=$(wget --no-check-certificate -qO- ${publicURL}/app 2>/dev/null)
fi
if [ "${connectionResponse}" == "INDEX" ]; then
connectionTest="OK"
else