03b9a7
#!/bin/sh
03b9a7
03b9a7
case "$2" in
03b9a7
        up|down|vpn-up|vpn-down)
03b9a7
                n=20
03b9a7
                while /usr/sbin/squid -k check >/dev/null 2>&1 && [ ! -f /var/run/squid.pid ] && [ $n -gt 0 ]; do
03b9a7
                    sleep 1
03b9a7
                    n=`expr $n - 1`
03b9a7
                done
03b9a7
03b9a7
                if [ -f /var/run/squid.pid ]; then
03b9a7
                        /bin/systemctl reload squid.service || :
03b9a7
                fi
03b9a7
                ;;
03b9a7
esac