[squid-users] squidctl script update

From: Andrei B. <andrixnet@dont-contact.us>
Date: Mon, 4 Jun 2001 01:39:53 -0700 (PDT)

Here's a small update to the squidctl script I submitted soemtime ago,
with a small fix.

Problem :

- when system crashed and a stale PID still existed, squid was not
started with the erroneous assumption that it is still running.

I don't know why, the test
if [ "x$PID" != "x" ] && kill -0 $PID ; then ....
failed to properly detect the stale PID.

FIX :

Changed to a separate if branch and now it works.

Notes :

Script makes a few static assumptions on where the squid binary,
squid.pid and squid.conf files are located.

If your setup differs, please change them.

Also, I look for shutdown_lifetime in squid.conf and add one second to
it to make sure squid makes a clean shutdown. I had some problems at
shutdown if I did not wait at all, also sometimes if I waited just the
amount specified in shutdown_lifetime. After I increased it I had no
problems.

Andrei

=====
ing. Andrei Boros
Centrul pt. Tehnologia Informatiei
Societatea Romana de Radiodifuziune

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/

Received on Mon Jun 04 2001 - 02:39:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:00:27 MST