From b6fd188d8aef3f7ef5f911a8e9dea7f69383e48a Mon Sep 17 00:00:00 2001 From: Fred Date: Wed, 8 Mar 2023 09:12:19 +0000 Subject: [PATCH] Update sup --- squid/sup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/squid/sup.sh b/squid/sup.sh index 2811e53..27c3756 100644 --- a/squid/sup.sh +++ b/squid/sup.sh @@ -14,19 +14,21 @@ if [ -n "$supicaphost" ]; then grep "200 OK" /tmp/test-icap-e2g-orion >/dev/null if [ $? = 0 ];then echo "SUP ICAP: ACCESS ICAP ok $supicaphost" + error=0 else echo "SUP ICAP: ERROR $supicaphost" error=1 fi fi -if [ -n "$supgethosts" ]; then +if [ -n "$supgethosts" ] && [ "error" == 0 ]; then for i in ${supgethosts[@]} do echo "CHECK: $i" curl -s -o /dev/null --connect-timeout 5 -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/96.0" $i if [ $? = 0 ];then echo "SUP: ACCESS ok $i" + error=0 break else echo "SUP: ERROR $i"