[2/2] core145: Enable OpenVPN metrics collection

Message ID 20200525091730.4059-2-michael.tremer@ipfire.org
State Accepted
Commit 6d78ec1a1ccfdc42f18b92bd5fcacab3be05f0b9
Headers
Series [1/2] openvpn: Create database schema if not exists |

Commit Message

Michael Tremer May 25, 2020, 9:17 a.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/rootfiles/core/145/update.sh | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/config/rootfiles/core/145/update.sh b/config/rootfiles/core/145/update.sh
index 5f5394f78..9ff64f7f9 100644
--- a/config/rootfiles/core/145/update.sh
+++ b/config/rootfiles/core/145/update.sh
@@ -73,6 +73,13 @@  for package in perl-DBI perl-DBD-SQLite; do
         rm -f /opt/pakfire/db/rootfiles/$package
 done
 
+# Enable OpenVPN metrics collection
+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
 /etc/init.d/vnstat start
 /etc/init.d/unbound restart