From 46bccfc21946f027ff81349cf9af33c9564f9b0c Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Tue, 16 Jun 2020 11:36:20 +0000 Subject: [PATCH] core146: add openvpn openvpn was missed in core145 so add it again. Signed-off-by: Arne Fitzenreiter --- config/rootfiles/core/146/filelists/openvpn | 1 + config/rootfiles/core/146/update.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 120000 config/rootfiles/core/146/filelists/openvpn diff --git a/config/rootfiles/core/146/filelists/openvpn b/config/rootfiles/core/146/filelists/openvpn new file mode 120000 index 0000000000..493f3f7a42 --- /dev/null +++ b/config/rootfiles/core/146/filelists/openvpn @@ -0,0 +1 @@ +../../../common/openvpn \ No newline at end of file diff --git a/config/rootfiles/core/146/update.sh b/config/rootfiles/core/146/update.sh index da00a387ae..c461d556fb 100644 --- a/config/rootfiles/core/146/update.sh +++ b/config/rootfiles/core/146/update.sh @@ -89,6 +89,8 @@ rm -rf /lib/modules # Remove files # Stop services +/usr/local/bin/openvpnctrl -k +/usr/local/bin/openvpnctrl -kn2n # Extract files extract_files @@ -115,7 +117,19 @@ done # Filesytem cleanup /usr/local/bin/filesystem-cleanup +# Enable OpenVPN metrics collection +sed -E -i /var/ipfire/ovpn/server.conf \ + -e "/^client-(dis)?connect/d" + +cat <> /var/ipfire/ovpn/server.conf +# Log clients connecting/disconnecting +client-connect "/usr/sbin/openvpn-metrics client-connect" +client-disconnect "/usr/sbin/openvpn-metrics client-disconnect" +EOF + # Start services +/usr/local/bin/openvpnctrl -s +/usr/local/bin/openvpnctrl -sn2n # remove lm_sensor config after collectd was started # to reserch sensors at next boot with updated kernel -- 2.39.5