[squid-users] issue with start / stop scripts

Amos Jeffries squid3 at treenet.co.nz
Mon Nov 30 01:06:09 UTC 2015


On 29/11/2015 8:11 p.m., Alex Samad wrote:
> Hi
> 
> its in the scripts
> stop() {
>         echo -n $"Stopping $prog: "
>         $SQUID -k check -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
>         RETVAL=$?
>         if [ $RETVAL -eq 0 ] ; then
> 
> 
> Any reason to check the config before stopping a running squid ??
> 

It seems to be extraneous. It certainly does not stop the proxy, and
will definitely slow the shutown process, potentially by a lot.

The only reason that makes sense is to ensure that the config is in a
sane state before stopping the proxy. Which kind of makes sense if
reconfigure or restart is implemented as a pair of "stop() && start()" -
but would be better implemented as calls to the relevant -k commands.

Amos



More information about the squid-users mailing list