[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a few observations in a multi-user setup
From: |
ng0 |
Subject: |
Re: a few observations in a multi-user setup |
Date: |
Sat, 26 Oct 2019 15:21:03 +0000 |
Ah, but rc.d != openrc:
https://www.usenix.org/legacy/events/usenix01/freenix01/full_papers/mewburn/mewburn_html/index.html
but I think your comment could still help, thanks.
xrs transcribed 2.3K bytes:
> > The user-service behaves odd enough for rc.d to report
> > "gnunetuser is not running" while the service is started
> > and running - how can we improve that so that service
> > managers can pick up the status?
> > on the other hand my service could still be hacky enough
> > to return 1 on status for whatever reason I missed yesterday.
>
> This helped me with rc and daemonizing:
>
> > To recap, in order of preference:
> >
> > If the daemon backgrounds itself and creates its own PID file, use
> > pidfile. If the daemon does not background itself (or has an option
> > to run in the foreground) and does not create a PID file, then use
> > command_background=true and pidfile. If the daemon backgrounds itself
> > and does not create a PID file, use procname instead of pidfile. But,
> > if your daemon has the option to run in the foreground, then you
> > should do that instead (that would be the case in the previous item).
> > The last case, where the daemon does not background itself but does
> > create a PID file, doesn't make much sense. If there's a way to
> > disable the daemon's PID file (or, to write it straight into the
> > garbage), then do that, and use command_background=true.
>
> https://github.com/OpenRC/openrc/blob/master/service-script-guide.md