On Fri, 2007-07-06 at 23:19 +0200, Jim Meyering wrote:
> Here's a proposed change:
>
> Update for Fedora/LSB init-scripts guidelines:
> <http://fedoraproject.org/wiki/FCNewInit/Initscripts>
> * etc/qpidd: Provide an LSB header.
> Allow options to be specified via QPIDD_OPTIONS=...
> in /etc/sysconfig/qpidd.
> Diagnose and 'exit 3' for the unsupported "reload".
> Don't mention unused $pidfile.
> Remove useless curly braces: ${lockfile} -> $lockfile.
> Write usage and error diagnostics to stderr, not stdout.
> Change spelling: condrestart -> try-restart.
>
> I'm not sure about the Default-Start/Stop run levels.
> If something different would be better, let me know.
> This little excursion leads me to propose a small
> improvement for qpidd: give qpidd a --pidfile=F (-p) option,
> whereby it would write its PID into the file F. This is better
> than relying on the default pidof-related machinery, for when the
> driver program is a script (e.g., a valgrind-running wrapper).
I can add that easily enough, it would solve the problem below:
> start() {
> - echo -n $"Starting Qpid AMQP daemon: "
> - daemon $prog --daemon
Not sure if it is correct to use both the daemon script and --daemon
option. Will this cause daemon to record the pid of the process started
by qpidd --daemon? If so thats not correct, since that process will fork
the real daemon process.
> stop() {
> @@ -29,9 +45,14 @@
> killproc $prog
Which pid is this going to kill?
I suspect we want to use either the daemon script or the --daemon option
but not both, though I'm not up on the init script guidelines. Adding
--pidfile might resolve the problem.
Cheers,
Alan.