3 # squid This shell script takes care of starting and stopping
4 # Squid Internet Object Cache
8 # description: Squid - Internet Object Cache. Internet object caching is \
9 # a way to store requested Internet objects (i.e., data \
10 # available \ via the HTTP, FTP, and gopher protocols) on a \
11 # system closer to the requesting site than to the source. \
12 # Web browsers can then use the local Squid cache as a proxy \
13 # HTTP server, reducing access time as well as bandwidth \
16 # pidfile: /var/run/squid.pid
17 # config: /etc/squid/squid.conf
20 # Source function library
21 . /etc/rc.d/init.d/functions
24 . /etc/sysconfig/network
27 [ -f /etc/sysconfig/squid ] && . /etc/sysconfig/squid
29 # Check that networking is up.
30 [ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0
33 [ -f /etc/squid/squid.conf ] || exit 0
36 # See how we were called.
39 # Check if the service is already running?
40 if [ ! -f /var/lock/subsys/squid ]; then
41 show Prepare squid cache
43 if [ ! -d $CACHE_SWAP/00 ]; then
44 squid -z -F &>/dev/null
49 daemon squid $SQUID_OPTS
51 echo "squid already is running"
53 touch /var/lock/subsys/squid
58 rm -f /var/lock/subsys/squid
68 echo "Usage: $0 {start|stop|status|restart|reload}"