On Tue, 2010-02-02 at 07:25 +0100, Bas Wijnen wrote:
> On Mon, Feb 01, 2010 at 07:42:50PM +0100, Roland Clobus wrote:
> > On Mon, 2010-02-01 at 19:24 +0100, Roland Clobus wrote:
> > And I forgot to mention:
> > 
> > I've also removed the directory part for /var/run, because it is not
> > needed anymore, and I don't think a directory for only one file makes
> > sense.
> 
> This is true, but it is the only way to make things work:
> - when using --background, start-stop-daemon does a double fork, to
>   orphan the (grand)child from the parent.

I remember working on the init script some time ago.
This time I did run the meta-server as a regular program (no --daemon)
and decided to let the start-stop-daemon program handle the PIDs. This
turned out to be working fine. (So there is no double fork, just a
single one, only by start-stop-daemon). 

> - pioneers-console must write its own pidfile; if start-stop-daemon does
>   that, it writes the dying child's pid.  The running grandchild's pid
>   is not recorded.
> 
> - The directory is needed because pioneers-meta-server isn't allowed to
>   write to /var/run.

start-stop-daemon is invoked with 'make-pid-file' so it will create the
pidfile by itself. That also means that the access rights are OK.

I noticed that the pidfile needs to be removed
by /etc/init.d/pioneers-meta-server because start-stop-daemon will only
create it.  (Not present in the patch)

> If your patch works (I didn't test yet), then start-stop-daemon is
> probably changed.  Do you know if this is the case?

With this new init-script I'm able to successfully start and stop the
meta-server.
I think the main change was in the invocation of the meta-server.

With kind regards,
Roland Clobus

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to