Page 1 of 1

Compile openvpn with templated systemd support

Posted: Thu Apr 26, 2018 12:10 pm
by Coul
Hi,
If I install openvpn 2.4.6 with official apt repository all is as expected, I have templated systemd openvpn services.

if I reinstall it with deb package compiled on my own with these options

Code: Select all

./configure --prefix=/ --exec-prefix=/usr --includedir=/usr/include --datarootdir=/usr/share --enable-systemd=yes
I don't have /lib/systemd/system/openvpn.service anymore and now all my profiles are set under one big openvpn process

Code: Select all

systemctl status openvpn 
● openvpn.service - LSB: Openvpn VPN service
   Loaded: loaded (/etc/init.d/openvpn; bad; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-26 11:43:19 UTC; 1s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 18715 ExecStop=/etc/init.d/openvpn stop (code=exited, status=0/SUCCESS)
  Process: 18741 ExecStart=/etc/init.d/openvpn start (code=exited, status=0/SUCCESS)
 Main PID: 15176 (code=exited, status=0/SUCCESS)
    Tasks: 10
   Memory: 4.3M
      CPU: 92ms
   CGroup: /system.slice/openvpn.service
           ├─18759 /usr/sbin/openvpn --writepid /run/openvpn/server-android.pid --daemon ovpn-server-android --cd /etc/openvpn --config /etc/openvpn/
           ├─18761 /usr/sbin/openvpn --writepid /run/openvpn/server-android.pid --daemon ovpn-server-android --cd /etc/openvpn --config /etc/openvpn/
           ├─18762 /usr/sbin/openvpn --writepid /run/openvpn/server-android.pid --daemon ovpn-server-android --cd /etc/openvpn --config /etc/openvpn/
           ├─18786 /usr/sbin/openvpn --writepid /run/openvpn/server-auth.pid --daemon ovpn-server-auth --cd /etc/openvpn --config /etc/openvpn/server
           ├─18790 /usr/sbin/openvpn --writepid /run/openvpn/server-auth.pid --daemon ovpn-server-auth --cd /etc/openvpn --config /etc/openvpn/server
           ├─18792 /usr/sbin/openvpn --writepid /run/openvpn/server-auth.pid --daemon ovpn-server-auth --cd /etc/openvpn --config /etc/openvpn/server
           ├─18816 /usr/sbin/openvpn --writepid /run/openvpn/server-cert.pid --daemon ovpn-server-cert --cd /etc/openvpn --config /etc/openvpn/server
           ├─18856 /usr/sbin/openvpn --writepid /run/openvpn/server-insecure.pid --daemon ovpn-server-insecure --cd /etc/openvpn --config /etc/openvp
           ├─18858 /usr/sbin/openvpn --writepid /run/openvpn/server-insecure.pid --daemon ovpn-server-insecure --cd /etc/openvpn --config /etc/openvp
           └─18859 /usr/sbin/openvpn --writepid /run/openvpn/server-insecure.pid --daemon ovpn-server-insecure --cd /etc/openvpn --config /etc/openvp
What am I missing?

Re: Compile openvpn with templated systemd support

Posted: Thu Apr 26, 2018 1:01 pm
by Anna
Good day! What VPN do I need to download for the windows 10 operating system ???? Help please

Re: Compile openvpn with templated systemd support

Posted: Thu Apr 26, 2018 2:12 pm
by TinCanTech
@Anna .. please do not post random comments on other peoples threads .. start your own.

Re: Compile openvpn with templated systemd support

Posted: Thu Jun 21, 2018 9:49 am
by Coul
Hi again.
So my problem is my deb packet doesn't create systemd files.
When I make systemctl start openvpn it uses earlier left here /etc/init.d/openvpn

What --enable-systemd=yes option does? Does it add /lib/systemd/system/openvpn.service and /lib/systemd/system/openvpn@.service files to deb packet? Or should I do it myself?
Thanks in advance.

Re: Compile openvpn with templated systemd support

Posted: Thu Jun 21, 2018 7:58 pm
by TinCanTech
Coul wrote:
Thu Jun 21, 2018 9:49 am
What --enable-systemd=yes option does?
This compilation option adds code which supports systemd functions .. it does not create the systemd .service files. I believe the .service files are provided by your distro maintainer.