blockcheck: stop on fatal curl errors

This commit is contained in:
bol-van 2021-12-08 21:23:06 +03:00
parent cefb245f6d
commit 627b24f36d

View File

@ -264,6 +264,8 @@ check_domain()
# $2 - port # $2 - port
# $3 - domain # $3 - domain
local code
echo echo
echo \* $1 $3 echo \* $1 $3
@ -272,7 +274,11 @@ check_domain()
killall nfqws 2>/dev/null killall nfqws 2>/dev/null
echo "- checking without DPI bypass" echo "- checking without DPI bypass"
curl_test $1 $3 && return 0 curl_test $1 $3 && return
code=$?
for c in 1 2 3 4 6 27 ; do
[ $code = $c ] && return
done
echo preparing nfqws redirection echo preparing nfqws redirection
nfqws_ipt_prepare $2 nfqws_ipt_prepare $2