diff --git a/squid/sup.sh b/squid/sup.sh index b98b749..708db81 100644 --- a/squid/sup.sh +++ b/squid/sup.sh @@ -3,8 +3,13 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin if [ -z "$supgethosts" ] && [ -z "$supicaphost" ]; then exit 0 fi + error=0 +while true +do +date=$(date +%d-%m-%Y_%w) + if [ -n "$supicaphost" ]; then c-icap-client -i $supicaphost -p $supicapport -s request > /tmp/test-icap-e2g-orion 2>&1 grep "200 OK" /tmp/test-icap-e2g-orion >/dev/null @@ -12,13 +17,11 @@ if [ -n "$supicaphost" ]; then echo "SUP ICAP: ACCESS ICAP ok $supicaphost" else echo "SUP ICAP: ERROR $supicaphost" + error=1 exit 1 fi fi -while true -do -date=$(date +%d-%m-%Y_%w) if [ -n "$supgethosts" ]; then for i in ${supgethosts[@]} do