Date: Wed, 10 Oct 2007 01:16:21 +0100 From: sdafreebsduk@rowyerboat.com To: "Philip M. Gollucci" <philip@ridecharge.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Question about rc-scripts Message-ID: <470C19D5.1060101@rowyerboat.com> In-Reply-To: <470AD780.30702@ridecharge.com> References: <470AB2FC.8070006@rowyerboat.com> <6.0.0.22.2.20071008183414.025a1e88@mail.computinginnovations.com> <470AD44A.4070601@rowyerboat.com> <470AD780.30702@ridecharge.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Philip, > Most binaries i.e. httpd, memcached, mysqld, etc... provide a config > file or cli option to provide the path to a pid file. Like you say - I can't find anything in rc.subr that would create a pid. So, I looked in /etc/rc.d/ntpd (for example), and I still can't find in there where it might create a pid. > Your particular problem is that run_rc_command actually exits so that > the script exits with the correct return code generally that of what > the application in question returns from trying to start or stop. > > Inless you have a reason, If you're running a daemon, you shouldn't need > to background the command. It /is/ a daemon > Also, rather then an echo try adding -x to the shebang line. Yeah, I did that whilst I was re-arranging it. I think my problem is, I don't understand properly what creates the pids for the standard scripts (like nptd), so I can't look at it to see how it's done. Many thanks, Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?470C19D5.1060101>