2 # squid This shell script takes care of starting and stopping
3 # Squid Internet Object Cache
6 # description: Squid - Internet Object Cache. Internet object caching is \
7 # a way to store requested Internet objects (i.e., data available \
8 # via the HTTP, FTP, and gopher protocols) on a system closer to the \
9 # requesting site than to the source. Web browsers can then use the \
10 # local Squid cache as a proxy HTTP server, reducing access time as \
11 # well as bandwidth consumption.
12 # pidfile: /var/run/squid.pid
13 # config: /etc/squid/squid.conf
15 # Source function library.
16 . /etc/rc.d/init.d/functions
18 # Source networking configuration.
19 . /etc/sysconfig/network
21 # Check that networking is up.
22 [ "${NETWORKING}" = "no" ] && exit 0
24 # check if the squid conf file is present
25 [ -f /etc/squid/squid.conf ] || exit 0
27 # Load startup variables
28 . /etc/sysconfig/squid
33 if [ ! -d $CACHE_SWAP/00 ]; then
34 squid -z -F &>/dev/null
36 daemon $NICELEVEL squid $SQUID_OPTS
37 touch /var/lock/subsys/squid
42 rm -f /var/lock/subsys/squid
52 echo "Usage: $0 {start|stop|status|restart}"