summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2022-04-01 11:14:37 +0200
committerLinus Nordberg <linus@nordberg.se>2022-04-01 11:14:37 +0200
commit3a485618e493ac646dbac295b2d7940d43e15551 (patch)
tree874a130bb226a76a4b49b7e3409fde16ac37fe6c /scripts
parent30bc3f64d6fa449e8046e9b62ccacc2076944364 (diff)
bugfix: checking onions wouldn't work, and wouldn't report a failure
That's because "$torconf" would become one argument to curl when it has to be two.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/testurl.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/testurl.sh b/scripts/testurl.sh
index 0607bae..a7b49f2 100755
--- a/scripts/testurl.sh
+++ b/scripts/testurl.sh
@@ -12,12 +12,12 @@ set -eu
URL="$1"; shift
-torconf=
-echo "$URL" | grep -q \\.onion && torconf="-x socks4a://127.0.0.1:9050/"
+curl="curl"
+echo "$URL" | grep -q \\.onion && curl="$curl -x socks4a://127.0.0.1:9050/"
function testurl() {
family="-$1"
- response=$(curl "$family" -L -s -w "%{http_code}" "$torconf" "$URL")
+ response=$($curl "$family" -L -s -w "%{http_code}" "$URL")
http_code=$(tail -n1 <<< "$response")
if [[ "$http_code" != 200 ]]; then