0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-19 19:42:30 +02:00

systemd: Enable systemd's auto-restart feature for server profiles

Systemd supervises services it has started and can act upon unexpected
scenarios.  This change will restart OpenVPN after 5 seconds if the OpenVPN
process exits unexpectedly.

The on-failure mode is the recommended mode by upstream systemd.

This change have been tested on a test server for some month, and it
works indeed as intended when provoking the OpenVPN process to stop.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20170906235202.26551-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15370.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
David Sommerseth 2017-09-07 01:52:02 +02:00
parent 682e7feac3
commit a4686e99b0
No known key found for this signature in database
GPG Key ID: 86CF944C9671FDF2

View File

@ -18,6 +18,8 @@ DeviceAllow=/dev/net/tun rw
ProtectSystem=true
ProtectHome=true
KillMode=process
RestartSec=5s
Restart=on-failure
[Install]
WantedBy=multi-user.target