[squid-users] issue with start / stop scripts

Alex Samad alex at samad.com.au
Sun Nov 29 07:11:15 UTC 2015


its in the scripts
stop() {
        echo -n $"Stopping $prog: "
        $SQUID -k check -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
        if [ $RETVAL -eq 0 ] ; then

Any reason to check the config before stopping a running squid ??

On 29 November 2015 at 09:32, Eliezer Croitoru <eliezer at ngtech.co.il> wrote:
> 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