How run openvpn with systemd
We have config with name
itc_life_ru.conf
Place itc_life_ru.conf file into /etc/openvpn/.
Edit /etc/default/openvpn. Uncomment this:
AUTOSTART="all"
Reload daemon
systemctl daemon-reload
Edit file
nano /etc/systemd/system/multi-user.target.wants/openvpn@itc_life_ru.service
[Unit] Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I After=syslog.target network.target [Service] PrivateTmp=true Type=forking PIDFile=/var/run/openvpn/%i.pid ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf [Install] WantedBy=multi-user.target
systemctl daemon-reload
Start service
systemctl status openvpn@itc_life_ru.service
Profit!!!