Re: Question about rc-scripts

2007-10-09 Thread Mel
On Tuesday 09 October 2007 03:07:22 Stephen Allen wrote: Hi Derek, Not all scripts create a pid file is the simple answer. I didn't see how the isc-dhcpd script or dovecot created a pid, so I assumed it was something that rc.subr took care of. Your script should create the pid file on

Re: Question about rc-scripts

2007-10-09 Thread sdafreebsduk
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

Re: Question about rc-scripts

2007-10-09 Thread Chuck Swiger
On Oct 9, 2007, at 5:16 PM, [EMAIL PROTECTED] wrote: 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

Question about rc-scripts

2007-10-08 Thread Stephen Allen
Under normal circumstance, should the /etc/rc.subr functions handle the creation of the pid at service start? The basic vendor-provided script (which I've had to adapt somewhat to suit this installation) runs echo $! ${dbgw_pidfile} as the last line of the script. When you do a 'status'

Re: Question about rc-scripts

2007-10-08 Thread Derek Ragona
At 05:45 PM 10/8/2007, Stephen Allen wrote: Under normal circumstance, should the /etc/rc.subr functions handle the creation of the pid at service start? The basic vendor-provided script (which I've had to adapt somewhat to suit this installation) runs echo $! ${dbgw_pidfile} as the last line

Re: Question about rc-scripts

2007-10-08 Thread Stephen Allen
Hi Derek, Not all scripts create a pid file is the simple answer. I didn't see how the isc-dhcpd script or dovecot created a pid, so I assumed it was something that rc.subr took care of. Your script should create the pid file on start, remove it on stop, and simply cat that file on a

Re: Question about rc-scripts

2007-10-08 Thread Philip M. Gollucci
Again, I thought the rc.subr functions took care of all that for you (unless you wanted something special from those commands). In general, they do see /etc/rc.subr: check_pidfile(), wait_for_pids(), Most binaries i.e. httpd, memcached, mysqld, etc... provide a config file or cli

Re: Question about rc-scripts

2007-10-08 Thread Philip M. Gollucci
Philip M. Gollucci wrote: Your particular problem is that run_rc_command actually exists so that the script exists with the correct return code generally that of what the application in question returns from trying to start or stop. s/exists/exits/g in the above.