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 if is_no "${NETWORKING}"; then
31 msg_Network_Down Squid
36 [ -f /etc/squid/squid.conf ] || exit 0
38 # See how we were called.
41 # Check if the service is already running?
42 if [ ! -f /var/lock/subsys/squid ]; then
45 squid -N $SQUID_OPTS &
46 if ps -C squid >/dev/null 2>&1; then
52 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/squid
54 msg_Already_Running Squid
59 if [ -f /var/lock/subsys/squid ]; then
62 rm -f /var/lock/subsys/squid >/dev/null 2>&1
77 msg_Usage "$0 {start|stop|status|restart}"