From: Arne Fitzenreiter Date: Tue, 16 Jun 2020 11:36:20 +0000 (+0000) Subject: core146: add openvpn X-Git-Tag: v2.25-core146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcore146;p=ipfire-2.x.git core146: add openvpn openvpn was missed in core145 so add it again. Signed-off-by: Arne Fitzenreiter --- 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