From owner-freebsd-questions Tue Aug 6 22: 0:18 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ED8037B400 for ; Tue, 6 Aug 2002 22:00:14 -0700 (PDT) Received: from backup.af.speednet.com.au (afgate.speednet.com.au [203.57.65.244]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58F6B43E3B for ; Tue, 6 Aug 2002 22:00:11 -0700 (PDT) (envelope-from andyf@speednet.com.au) Received: from backup.af.speednet.com.au (andyf@backup.af.speednet.com.au [172.22.2.4]) by backup.af.speednet.com.au (8.11.6/8.11.6) with ESMTP id g774xVu76209; Wed, 7 Aug 2002 14:59:35 +1000 (EST) (envelope-from andyf@speednet.com.au) Date: Wed, 7 Aug 2002 14:59:31 +1000 (EST) From: Andy Farkas X-X-Sender: To: Martin Tsanov Cc: Subject: Re: startup script for killing the squid pid In-Reply-To: <000901c23abf$bd8d16e0$0764a8c0@cyberzone.odessos.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 3 Aug 2002, Martin Tsanov wrote: > Hello list, > > I have an internet cafe and use FreeBSD as a gateway/firewall > doing DNS, Apache, PHP, MySQL and Squid. Everything works > just great, except that i have an issue with Squid. This is not an > always on machine, it is switched on in the morning and turned off > in the evening. Sometimes (about 15%) Squid is not automatically > started and therefore the local clients can't access the internet. > When i try to run it manually, i get a message: Squid is already > running, > pid xxxx. So, i have to kill this pid and then start it manually. I > think > that somehow this pid has remained from the previous booting of the > machine. > Can someone recommend a startup script, which will check if the squid > pid exists, then killing it and only after that starting squid? My > shell is csh. > > %uname -a > FreeBSD cyberzone.odessos.org 4.6-STABLE FreeBSD 4.6-STABLE #0: > Wed Jun 26 20:54:49 EEST 2002 > Murphy@cyberzone.odessos.org:/usr/obj/usr/src/sys/CYBERZONE i386 > > Thanx in advance. > Martin > The problem is squid not having enough time to shutdown properly. Look in /usr/local/etc/rc.d/squid.sh for a solution. -- :{ andyf@speednet.com.au Andy Farkas System Administrator Speednet Communications http://www.speednet.com.au/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message