3 [ -x /usr
/sbin
/squid
] ||
exit 0
4 [ -f /etc
/squid.conf
] ||
exit 0
8 printf "Starting squid: "
9 if [ ! -d /var
/log
/squid
]; then
10 mkdir
-p /var
/log
/squid
11 chown squid
:squid
/var
/log
/squid
13 start-stop-daemon
-S -x /usr
/sbin
/squid
14 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
18 printf "Stopping squid: "
19 /usr
/sbin
/squid
-k shutdown
20 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
24 printf "Reloading squid configuration: "
25 /usr
/sbin
/squid
-k reconfigure
26 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
30 printf "Restarting squid: "
31 /usr
/sbin
/squid
-k restart
32 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
36 echo "Usage: $0 {start|stop|reload|restart}"