Re: Squid inactive but pid file exist



On Thursday 03 August 2006 18:40, Antonello PAPA wrote:
Squid Cache (Version 2.5.STABLE9): Terminated abnormally"


RedHat init script stupidities.


wellwell

certainly a squid stupidity since it does not start when a pid file exist and
does not delete it either

to help yourself you can add something like this to your startup script in
order not getting bothered again by incorrect shutdowns or crashes:

######
pidfile="/usr/local/squid/var/logs/squid0.pid"
pid=`cat $pidfile`
running=`ps ax | grep $pid | awk '{print $1}'`

if [ -r $pidfile ]; then

if [ -z "${running}" ]; then
#/bin/rm $pidfile
echo "existing $pidfile deleted!"
else
echo "squid still running ..."
fi
fi
######

you should put it before the squid start scenario and it should run as sh
script otherwise you may need to figure it out for bash how to do it.

Hans







A mensagem foi scaneada pelo sistema de e-mail e pode ser considerada segura.
Service fornecido pelo Datacenter Matik https://datacenter.matik.com.br

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages