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_yes "${NETWORKING}"; then
31 if [ ! -f /var/lock/subsys/network ]; then
32 msg_network_down Squid
40 [ -f /etc/squid/squid.conf ] || exit 0
42 # See how we were called.
45 # Check if the service is already running?
46 if [ ! -f /var/lock/subsys/squid ]; then
49 daemon $SERVICE_RUN_NICE_LEVEL squid $SQUID_OPTS
51 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/squid
53 msg_already_running Squid
59 if [ -f /var/lock/subsys/squid ]; then
62 rm -f /var/lock/subsys/squid >/dev/null 2>&1
69 $0 stop && echo -n "Waiting $DELAY_IN_RESTART seconds..." && sleep $DELAY_IN_RESTART && echo "done."
73 if [ -f /var/lock/subsys/squid ]; then
88 nls "Initializing squid"
92 msg_usage "$0 {start|stop|init|restart|reload|status}"