From owner-freebsd-questions Sun Jan 14 22:14:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 30F4537B400 for ; Sun, 14 Jan 2001 22:14:12 -0800 (PST) Received: from rfx-64-6-211-149.users.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Sun, 14 Jan 2001 22:12:25 -0800 Received: (from cjc@localhost) by rfx-64-6-211-149.users.reflexcom.com (8.11.1/8.11.0) id f0F6E1S42365; Sun, 14 Jan 2001 22:14:01 -0800 (PST) (envelope-from cjc) Date: Sun, 14 Jan 2001 22:14:01 -0800 From: "Crist J. Clark" To: Odhiambo Washington Cc: Matthew Emmerton , FBSD-Q Subject: Re: Starting daemons in rc.local Message-ID: <20010114221401.Y97980@rfx-64-6-211-149.users.reflexco> Reply-To: cjclark@alum.mit.edu References: <20010113220443.A528@poeza.iconnect.co.ke> <005e01c07d97$b7fdef60$1200a8c0@gsicomp.on.ca> <20010114104750.A4581@poeza.iconnect.co.ke> <00bc01c07e43$8e0429c0$1200a8c0@gsicomp.on.ca> <20010115085056.B9478@poeza.iconnect.co.ke> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20010115085056.B9478@poeza.iconnect.co.ke>; from wash@iconnect.co.ke on Mon, Jan 15, 2001 at 08:50:56AM +0300 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 ;; -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message