openvpn/openvpn.service
Reinhard Max 1a139c3c1b Accepting request 829828 from home:fbui:branches:network:vpn
- Modernize openvpn.service
  * /var/run has been obsoleted since a long time.
  * on reload, send HUP signal directly rather than relying on
    killproc to look for the main process.

- Explicitly requires sysvinit-tools as some of the tools shipped by
  this package are used in various places regardless of whether
  openvpn is built for systemd or non systemd systems.
  For the context: sysvinit-tools was pulled in by systemd since 2014
  but it's no longer the case so better to be safe than sorry.

OBS-URL: https://build.opensuse.org/request/show/829828
OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=152
2020-08-28 10:05:24 +00:00

17 lines
506 B
Desktop File

[Unit]
Description=OpenVPN tunneling daemon instance using /etc/openvpn/%i.conf
After=network.target
PartOf=openvpn.target
[Service]
Type=notify
PrivateTmp=true
PIDFile=/run/openvpn/%i.pid
ExecStart=/usr/sbin/openvpn --daemon openvpn@%i --suppress-timestamps --writepid /run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
# boo#1142830: "reload" does not work if openvpn drops root privileges after startup.
ExecReload=/usr/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target openvpn.target