diff --git a/files/usr/local/bin/olsrd-config b/files/usr/local/bin/olsrd-config index e3c4d4f4..df5bbc19 100755 --- a/files/usr/local/bin/olsrd-config +++ b/files/usr/local/bin/olsrd-config @@ -192,7 +192,7 @@ if validate then valid_services[#valid_services + 1] = service elseif proto == "http" then -- http so looks like a link. http check it - local status, effective_url = io.popen("/usr/bin/curl --retry 0 --connect-timeout 2 --speed-time 5 --speed-limit 1000 --silent --output /dev/null --location --write-out '%{http_code} %{url_effective}' " .. "http://" .. hostname .. ":" .. port .. path):read("*a"):match("^(%d+) (.*)") + local status, effective_url = io.popen("/usr/bin/curl --max-time 10 --retry 0 --connect-timeout 2 --speed-time 5 --speed-limit 1000 --silent --output /dev/null --location --write-out '%{http_code} %{url_effective}' " .. "http://" .. hostname .. ":" .. port .. path):read("*a"):match("^(%d+) (.*)") if status == "200" or status == "401" then valid_services[#valid_services + 1] = service elseif status == "301" or status == "302" or status == "303" or status == "307" or status == "308" then