[squid-users] issue with start / stop scripts

Eliezer Croitoru eliezer at ngtech.co.il
Sat Nov 28 22:32:16 UTC 2015


A check on what?
Basically to verify if squid is still running you need to verify that 
there are is not one squid instance running.
The PID is kind of a hack to make sure squid is still there or not.
In most cases you can cancel the timeout and check only for the PID.
Also notice that there is a "rm -rf" there which was inherited from an 
old script that I got as a "gift" since my own script got lost in a 
server migration.

You can run three checks in parallel:
- the pid exists or not
- the process exists or not(using "ps aux|grep squid")
- check if the port in netstat is still in listening mode.

Hope it helps,
Eliezer

On 29/11/2015 00:21, Alex Samad wrote:
> Hi
>
> yeah from the rpms. I found the variables to lengthen the timeout period.
>
> But I got in the strange situation where the pid file was still there
> (shutdown took longer than the timeout). and the scripts still thought
> it was running, so stop would fail as it does a check first. do we
> need to do a check first on shutdown ??
>
> A



More information about the squid-users mailing list