summaryrefslogtreecommitdiff
path: root/debian/openvpn@.service
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openvpn@.service')
-rw-r--r--debian/openvpn@.service5
1 files changed, 4 insertions, 1 deletions
diff --git a/debian/openvpn@.service b/debian/openvpn@.service
index 53ff5a5..7f0134b 100644
--- a/debian/openvpn@.service
+++ b/debian/openvpn@.service
@@ -3,7 +3,7 @@ Description=OpenVPN connection to %i
PartOf=openvpn.service
ReloadPropagatedFrom=openvpn.service
Before=systemd-user-sessions.service
-After=syslog.target network-online.target
+After=network-online.target
Wants=network-online.target
Documentation=man:openvpn(8)
Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
@@ -15,6 +15,7 @@ PrivateTmp=true
WorkingDirectory=/etc/openvpn
ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf --writepid /run/openvpn/%i.pid
PIDFile=/run/openvpn/%i.pid
+KillMode=process
ExecReload=/bin/kill -HUP $MAINPID
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE
LimitNPROC=10
@@ -22,6 +23,8 @@ DeviceAllow=/dev/null rw
DeviceAllow=/dev/net/tun rw
ProtectSystem=true
ProtectHome=true
+RestartSec=5s
+Restart=on-failure
[Install]
WantedBy=multi-user.target