]> git.ipfire.org Git - thirdparty/openvpn.git/commit
systemd: Ensure systemd shuts down OpenVPN in a proper way
authorDavid Sommerseth <davids@openvpn.net>
Wed, 6 Sep 2017 23:47:05 +0000 (01:47 +0200)
committerDavid Sommerseth <davids@openvpn.net>
Thu, 21 Sep 2017 23:33:30 +0000 (01:33 +0200)
commitb49c1ca407e046debebf5633c117d679b9e20555
tree82d2ae1367623710c79e2b0430e1a752c5519a11
parenta4c5c4bba4963ad107d6bf6eb5937a4cde6c1a0c
systemd: Ensure systemd shuts down OpenVPN in a proper way

By default, when systemd is stopping OpenVPN it will send the SIGTERM
to all processes within the same process control-group.  This can come
as a surprise to plug-ins which may have fork()ed out child processes.

So we tell systemd to only send the SIGTERM signal to the main OpenVPN
process and let OpenVPN take care of the shutdown process on its own.

If the main OpenVPN process does not stop within 90 seconds (unless
changed), it will send SIGKILL to all remaining processes within
the same process control-group.

This issue have been reported in both Debian and Fedora.

Trac: 581
Message-Id: <20170906234705.26202-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15369.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
[DS: Applied lazy-ack policy]
(cherry picked from commit 29446a18e1f2b52d20f359253b085e96fe458367)
distro/systemd/openvpn-client@.service.in
distro/systemd/openvpn-server@.service.in