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
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to