Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2001 22:14:01 -0800
From:      "Crist J. Clark" <cjclark@reflexnet.net>
To:        Odhiambo Washington <wash@iconnect.co.ke>
Cc:        Matthew Emmerton <matt@gsicomp.on.ca>, FBSD-Q <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Starting daemons in rc.local
Message-ID:  <20010114221401.Y97980@rfx-64-6-211-149.users.reflexco>
In-Reply-To: <20010115085056.B9478@poeza.iconnect.co.ke>; from wash@iconnect.co.ke on Mon, Jan 15, 2001 at 08:50:56AM %2B0300
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>

next in thread | previous 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
            ;;

-- 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010114221401.Y97980>