From owner-freebsd-questions Fri Aug 2 23:20:59 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 7791437B400 for ; Fri, 2 Aug 2002 23:20:57 -0700 (PDT) Received: from ns.odessos.org (ns.odessos.org [212.50.30.193]) by mx1.FreeBSD.org (Postfix) with SMTP id AD31043E72 for ; Fri, 2 Aug 2002 23:20:54 -0700 (PDT) (envelope-from cyberzone@odessos.org) Received: (qmail 31602 invoked from network); 3 Aug 2002 06:21:00 -0000 Received: from unknown (HELO K6) (@212.50.30.198) by ns.odessos.org with SMTP; 3 Aug 2002 06:21:00 -0000 Message-ID: <000901c23abf$bd8d16e0$0764a8c0@cyberzone.odessos.org> From: "Martin Tsanov" To: Subject: startup script for killing the squid pid Date: Sat, 3 Aug 2002 09:31:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 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 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message