Compile openvpn with templated systemd support

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
Coul
OpenVpn Newbie
Posts: 2
Joined: Thu Apr 26, 2018 11:52 am

Compile openvpn with templated systemd support

Post by Coul » Thu Apr 26, 2018 12:10 pm

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?

Anna
OpenVpn Newbie
Posts: 1
Joined: Thu Apr 26, 2018 12:57 pm

Re: Compile openvpn with templated systemd support

Post by Anna » Thu Apr 26, 2018 1:01 pm

Good day! What VPN do I need to download for the windows 10 operating system ???? Help please

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5089
Joined: Fri Jun 03, 2016 1:17 pm

Re: Compile openvpn with templated systemd support

Post by TinCanTech » Thu Apr 26, 2018 2:12 pm

@Anna .. please do not post random comments on other peoples threads .. start your own.

Coul
OpenVpn Newbie
Posts: 2
Joined: Thu Apr 26, 2018 11:52 am

Re: Compile openvpn with templated systemd support

Post by Coul » Thu Jun 21, 2018 9:49 am

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.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5089
Joined: Fri Jun 03, 2016 1:17 pm

Re: Compile openvpn with templated systemd support

Post by TinCanTech » Thu Jun 21, 2018 7:58 pm

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.

Post Reply