On Fri, 16 Jan 1998, Marius Panait wrote:
> /usr/bin/kill `/usr/bin/cat /usr/local/squid/logs/squid.pid`
> is enough, because /usr/local/squid/bin/RunCache take care to startup the squid.
>
> marius
> -----Original Message-----
> From: Basavaraj Veerappa [SMTP:basavak@wiproge.med.ge.com]
> Sent: Friday, January 16, 1998 8:05 PM
> To: squid-users@nlanr.net
> Subject: Startup & shutdown Squid
>
> Hi,
> What is the best way to startup and shutdown squid on a Solaris machine?
> Thanks
> Basvaraj
I guess the question was what System startup/shutdown scripts to use?
Well I'll answer that one anyway.
I use the following as /etc/init.d/squid. [I guess the su - cache bit is
strictly unnecessary, but it works for me].
How long you wait for the process to terminate depends on how long it
takes your cache to write out it's log.
No doubt this could be improved on, though.
John
-- #!/bin/sh killproc() { # kill the named process(es) pid=`/usr/bin/ps -e | /usr/bin/grep $1 | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` [ "$pid" != "" ] && kill -$2 $pid } # # Start/stop webcache # case "$1" in 'start') if [ -x /squid/bin/RunCache ]; then su - cache -c /squid/bin/RunCache & fi ;; 'stop') echo "Wait 45 seconds for squid process to terminate..." killproc RunSquid KILL killproc squid TERM sleep 45 ;; *) echo "Usage: /etc/init.d/squid { start | stop }" ;; esacReceived on Fri Jan 16 1998 - 06:11:24 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:27 MST