Update sup

This commit is contained in:
Fred 2023-03-08 09:12:19 +00:00
parent eea0b60760
commit b6fd188d8a

View File

@ -14,19 +14,21 @@ if [ -n "$supicaphost" ]; then
grep "200 OK" /tmp/test-icap-e2g-orion >/dev/null grep "200 OK" /tmp/test-icap-e2g-orion >/dev/null
if [ $? = 0 ];then if [ $? = 0 ];then
echo "SUP ICAP: ACCESS ICAP ok $supicaphost" echo "SUP ICAP: ACCESS ICAP ok $supicaphost"
error=0
else else
echo "SUP ICAP: ERROR $supicaphost" echo "SUP ICAP: ERROR $supicaphost"
error=1 error=1
fi fi
fi fi
if [ -n "$supgethosts" ]; then if [ -n "$supgethosts" ] && [ "error" == 0 ]; then
for i in ${supgethosts[@]} for i in ${supgethosts[@]}
do do
echo "CHECK: $i" 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 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 if [ $? = 0 ];then
echo "SUP: ACCESS ok $i" echo "SUP: ACCESS ok $i"
error=0
break break
else else
echo "SUP: ERROR $i" echo "SUP: ERROR $i"