diff options
author | Christian Hesse | 2017-01-24 15:39:46 +0100 |
---|---|---|
committer | David Sommerseth | 2017-01-25 19:39:42 +0100 |
commit | ca5b4c2aad2370be7862660d274b7485f2d0af71 (patch) | |
tree | d3272131b728ee9430f0fda7195dd9c72dabc5c8 /distro/systemd/openvpn-client@.service.in | |
parent | e83a8684f0a0d944e9d53cdad2b543cfd1b6fbae (diff) | |
download | openvpn-ca5b4c2aad2370be7862660d274b7485f2d0af71.zip openvpn-ca5b4c2aad2370be7862660d274b7485f2d0af71.tar.gz |
systemd: Use automake tools to install unit files
If systemd is enabled we install unit files to $libdir/systemd/system
(or the path specified by SYSTEMD_UNIT_DIR).
The unit files are generated on the fly with matching $sbindir.
Signed-off-by: Christian Hesse <mail@eworm.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20170124143947.27385-1-list@eworm.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13940.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
Diffstat (limited to 'distro/systemd/openvpn-client@.service.in')
-rw-r--r-- | distro/systemd/openvpn-client@.service.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/distro/systemd/openvpn-client@.service.in b/distro/systemd/openvpn-client@.service.in new file mode 100644 index 0000000..d933772 --- /dev/null +++ b/distro/systemd/openvpn-client@.service.in @@ -0,0 +1,22 @@ +[Unit] +Description=OpenVPN tunnel for %I +After=syslog.target network-online.target +Wants=network-online.target +Documentation=man:openvpn(8) +Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage +Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO + +[Service] +Type=notify +PrivateTmp=true +RuntimeDirectory=openvpn-client +RuntimeDirectoryMode=0710 +WorkingDirectory=/etc/openvpn/client +ExecStart=@sbindir@/openvpn --suppress-timestamps --nobind --config %i.conf +CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE +LimitNPROC=10 +DeviceAllow=/dev/null rw +DeviceAllow=/dev/net/tun rw + +[Install] +WantedBy=multi-user.target |