Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2001 01:03:04 -0500
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        "Odhiambo Washington" <wash@iconnect.co.ke>
Cc:        "FBSD-Q" <freebsd-questions@freebsd.org>
Subject:   Re: Starting daemons in rc.local
Message-ID:  <001401c07eb8$d5094290$1200a8c0@gsicomp.on.ca>
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
> 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???

Most daemons will look for an environment variable or a command line option
specifying where a pid file should be created.

If the daemon doesn't support this, then modify the if block in the start
section of your script to look like this (in your case you'll have to do
this for both radiusd and filterd):

if [ -f /sbin/radiusd]; then
  /sbin/radiusd -d /etc/raddb -a /var/adm/radacct && echo -n "radius"
  ps -ax | grep radiusd | head -1 | awk ' { print $1 } ' >
/var/run/radiusd.pid
fi

Keep in mind that this method is not entirely foolproof.

--
Matt Emmerton



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?001401c07eb8$d5094290$1200a8c0>