On 30-11-16 10:15, Christian Hesse wrote:
> Steffan Karger <steffan.kar...@fox-it.com> 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.

Perfect.  Thanks for the swift response.  (Confusing API though...)

-Steffan


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to