From owner-freebsd-questions Sun Jan 14 23:11:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id E164D37B401 for ; Sun, 14 Jan 2001 23:11:06 -0800 (PST) Received: from [195.11.243.26] (helo=Debug) by post.mail.nl.demon.net with smtp (Exim 3.14 #4) id 14I3nF-0001wq-00; Mon, 15 Jan 2001 07:11:05 +0000 To: cjclark@alum.mit.edu, Odhiambo Washington , Matthew Emmerton , FBSD-Q From: Cliff Sarginson Subject: Re: Starting daemons in rc.local Date: Mon, 15 Jan 2001 07:11:05 GMT X-Mailer: www.webmail.nl.demon.net X-Sender: postmaster@btvs.demon.nl X-Originating-IP: 192.250.24.58 Message-Id: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Mon, Jan 15, 2001 at 08:50:56AM +0300, Odhiambo Washington wrote: > > [snip] > > > Hi Matthew, > > > > Thank you once again for reverting to me. I'm writing to inform you that > > I also tried to adapt the example script in rc(8) man page for > > 4.2-STABLE but I realized that even though the processes started, they > > were not creating the process pid in /var/run. So really i am now into > > looking at a way of having the magic pid created.... > > > > Does anyone know how to achieve this for any process??? > > If the program does not actually need to have a smooth shutdown, you > can always make the stop a nop, > > 'stop') > # Do nothing > ;; > > Or we can make an attempt to pull the PID from the ps(1) output, > > 'stop') > # Extract a PID > PID=`ps ax | awk '/INSERT PROGRAM NAME HERE/ { print $1 }'` > # Kill the process > kill $PID > ;; > Or you could try killall program (despite it's name killall does not kill everything :) Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message