|
From: Christian H. <li...@ew...> - 2016-11-30 09:15:33
|
Steffan Karger <ste...@fo...> on Wed, 2016/11/30 10:06:
> Hi,
>
> On 30-11-16 09:59, Christian Hesse wrote:
> > --- a/src/openvpn/init.c
> > +++ b/src/openvpn/init.c
> > @@ -926,6 +926,13 @@ bool
> > possibly_become_daemon (const struct options *options)
> > {
> > bool ret = false;
> > +
> > +#ifdef ENABLE_SYSTEMD
> > + /* return without forking if we are running from systemd */
> > + if (sd_notify(0, "READY=0") > 0)
> > + return ret;
> > +#endif
> > +
> > if (options->daemon)
> > {
> > ASSERT (!options->inetd);
>
> Does this mean I cannot run openvpn --config bla.conf --daemon from the
> command line any more on a systemd system? This would be a deal-breaker
> for me.
No. That means openvpn knows when it is run from within a system service.
Daemonization is refused there as we we start with "Type=notify".
sd_notify() is a no-op when run from command line. So everything works as
usual.
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];)
putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
|