From 627b24f36d53f4f56114d6cc986e4e436679a431 Mon Sep 17 00:00:00 2001 From: bol-van Date: Wed, 8 Dec 2021 21:23:06 +0300 Subject: [PATCH] blockcheck: stop on fatal curl errors --- blockcheck.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blockcheck.sh b/blockcheck.sh index c68288e..3538c32 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -264,6 +264,8 @@ check_domain() # $2 - port # $3 - domain + local code + echo echo \* $1 $3 @@ -272,7 +274,11 @@ check_domain() killall nfqws 2>/dev/null 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 nfqws_ipt_prepare $2