Re: [squid-users] Squid not running, PID exists

From: Michel \(M\) <michel_at_lucenet.com.br>
Date: Fri, 23 May 2008 15:40:22 -0300 (BRT)

Adrian Chadd disse na ultima mensagem:
> On Fri, May 23, 2008, Nick Duda wrote:
>> Btw, doing squid -k shutdown still doesn't remove the PID.
>>
>> The reason why this is important to me is a script I am writing to do
>> failover with WCCP.
>
> Thats why I generally use cachemgr to determine if Squid is running,
> not the .pid file.
>

well, unfortunatly the pid thing is kind of bad solved within squid startup

if you like the following you can get around and rid of the problem by
modifying your startup scripts with the following

#!/bin/sh
pid_file="/squid/var/logs/squid.pid"
pid=`cat $pid_file`
if [ ! "`ps acocomm -p $pid | grep squid`" ]; then rm $pid_file; fi

to make it complete you need to write another part to check if it is
running without pid file and another to check if the pid file is from the
running squid and then start it secure and for sure

... starting blabla comes here

michel

...

****************************************************
Tecnologia Internet Matik http://info.matik.com.br
Sistemas Wireless para o Provedor Banda Larga
Hospedagem e Email personalizado - e claro, no Brasil.
****************************************************
Received on Fri May 23 2008 - 18:40:56 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 05 2008 - 01:05:14 MDT