Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2001 07:11:05 GMT
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        cjclark@alum.mit.edu, Odhiambo Washington <wash@iconnect.co.ke>, Matthew Emmerton <matt@gsicomp.on.ca>, FBSD-Q <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Starting daemons in rc.local
Message-ID:  <E14I3nF-0001wq-00@post.mail.nl.demon.net>

next in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E14I3nF-0001wq-00>