]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
core146: add openvpn core146 v2.25-core146
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 16 Jun 2020 11:36:20 +0000 (11:36 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 16 Jun 2020 11:36:20 +0000 (11:36 +0000)
openvpn was missed in core145 so add it again.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/146/filelists/openvpn [new symlink]
config/rootfiles/core/146/update.sh

diff --git a/config/rootfiles/core/146/filelists/openvpn b/config/rootfiles/core/146/filelists/openvpn
new file mode 120000 (symlink)
index 0000000..493f3f7
--- /dev/null
@@ -0,0 +1 @@
+../../../common/openvpn
\ No newline at end of file
index da00a387aec27038e7845df2ae44abf82a129634..c461d556fb49a1993b7c3a9d13ff13d13478c723 100644 (file)
@@ -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 <<EOF >> /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