openvpn: add generic hotplug mechanism
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 30 Nov 2018 13:03:50 +0000 (14:03 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 17 Jun 2020 20:43:48 +0000 (22:43 +0200)
commit8fe9940db66517679f09fa1d2f6f79229b6a8361
tree4d58657e38d19f2ec01b7ff21524688deb62e3e0
parent9c16c46e58b9758a91ba68d8acea052a5375546f
openvpn: add generic hotplug mechanism

Pass a default --up and --down executable to each started OpenVPN instance
which triggers /etc/hotplug.d/openvpn/ scripts whenever an instance
goes up or down.

User-configured up and down scripts are invoked by the default shipped
01-user hotplug handler to ensure that existing setups continue to work
as before.

As a consequence of this change, the up, down and script_security OpenVPN
options are removed from the option file, since we're always passing them
via the command line, they do not need to get included into the generated
configuration.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
[reword commit message, move hotplug executable to /usr/libexec]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/network/services/openvpn/Makefile
package/network/services/openvpn/files/etc/hotplug.d/openvpn/01-user [new file with mode: 0644]
package/network/services/openvpn/files/etc/openvpn.user [new file with mode: 0644]
package/network/services/openvpn/files/openvpn.init
package/network/services/openvpn/files/openvpn.options
package/network/services/openvpn/files/usr/libexec/openvpn-hotplug [new file with mode: 0644]