How do I cleanly shut down squid?

From: Matthew Petach <mattp@dont-contact.us>
Date: Tue, 22 Jul 1997 12:14:26 -0700 (PDT)

Strange question...

When I try to shut down squid by doing this:

        if [ -f /opt/INEXsquid/logs/squid.pid ] ; then
                pid=`/bin/cat /opt/INEXsquid/logs/squid.pid`
                echo "Stopping squid pid $pid..."
                if [ "X$pid" != "X" ] ; then
                        kill $pid
                fi
        else
                echo "Sorry. No calamari."
        fi

Then squid cleans up, and immediately re-spawns a new copy.

How should I kill squid so it stays dead? The start section
of the init script looks like this:

case $1 in
'start')
        if [ -f /opt/INEXsquid/bin/RunCache ]; then
                echo "starting Squid proxy/cache..."
                /opt/INEXsquid/bin/RunCache /opt/INEXsquid/etc/squid.conf &
        fi
        ;;

Am I not supposed to be using the RunCache script? From the
looks of it, the RunCache script seems to be attempting to
always spawn new copies of squid, no matter what. This isn't
very friendly behaviour for something being called from init
scripts on a SYSV system. :-(

Any pointers would be appreciated.

Thanks!

Matt

-- 
InterNex Information Services   |           Matthew Petach
Network Engineering             |           mpetach@internex.net
2306 Walsh Avenue               |           Tel: (408) 327-2211
Santa Clara, CA  95051          |           Fax: (408) 496-5484
Received on Tue Jul 22 1997 - 12:20:27 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:49 MST