Re: [squid-users] Can not shutdown squid

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Sat, 03 Feb 2007 22:03:53 +0100

fre 2007-02-02 klockan 20:36 +0100 skrev Thomas-Martin Seck:

> Does 'squid -k shutdown' exit != 0 when it fails like in the above case?

I think so.

> If yes, I could bail out early and avoid the infinite waiting loop.

What I do in my shutdown RC scripts is to

 1. "squid -k check 2>/dev/null", to see if Squid is at all running.

 2. If running, then "squid -k shutdown".

 3. Loop for a limited period of time (i.e. some minutes) over "squid -k
check 2>/dev/null".

 4. If "squid -k check" still says Squid is running, "squid -k kill" as
something probably has gone very wrong..

1 is entirely optional, just there to silence things a bit when Squid is
not running.

Regards
Henrik

Received on Sat Feb 03 2007 - 14:03:58 MST

This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:01 MST