I'm looking to bypass Squid incase of failure could I get some help with this script?


Code:
#!/bin/sh
while [ 1 ]; do
    TEST_SQUID=`netstat -a | grep -c https
    if [ "$TEST_SQUID" -gt 0 ]; then
        something here that starts forwarding https (iptables or xinetd)? 
    fi
    sleep 60
done


and other 

#!/bin/sh
while [ 1 ]; do
    TEST_SQUID=`netstat -a | grep -c :httpd
    if [ "$TEST_SQUID" -gt 2 ]; then
        something here that starts forwarding https (iptables or xinetd)?
    fi
    sleep 60
done
Also need to combine these somehow. Any help?
[/code]