Re: Anybody has a script to restart squid?

From: Gareth Blades <gblades@dont-contact.us>
Date: Mon, 10 Feb 1997 09:24:14 +0000

> Date: Mon, 10 Feb 1997 17:50:34 +0900
> To: squid-users@nlanr.net
> From: Youngjoo Song <boobtube@kol.net>
> Subject: Anybody has a script to restart squid?

>
> My Squid dies for some reason from time to time. I'm looking into the cause
> of the problem. For the time being, however, I need a script(in csh or
> perl) which periodically detects whether the Squid runs or not and that
> restarts Squid when it's dead.

Try something like this. It checks the squid.pid file and if it does
not exist runs squid. Just add a crontab entry to run it every minute
or so.

 #!/bin/sh
if [ \! -f "/var/run/squid.pid" ]; then
  /usr/local/squid/bin/squid -D &
fi

       \\|//
      -(@ @)-
===oOO==(_)==OOo===================================================
Gareth Blades | Tel: +44 (0)1329 443564 | Segensworth Road
gblades@as.neag.co.uk | Fax: +44 (0)1329 443423 | Titchfield
IT Engineer | WWW: www.neag.co.uk | Fareham, Hants
Assessment Services | | PO15 5RH, England
===================================================================
Received on Mon Feb 10 1997 - 01:34:15 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:24 MST