From daf34294f233a414cd14d08b1269b8192b591096 Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Mon, 13 Apr 2015 15:03:17 +0200 Subject: [PATCH] vpn-statistic: update old n2n configs in update.sh --- config/rootfiles/core/89/update.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/rootfiles/core/89/update.sh b/config/rootfiles/core/89/update.sh index bb6c7a544a..90a6d776b0 100644 --- a/config/rootfiles/core/89/update.sh +++ b/config/rootfiles/core/89/update.sh @@ -75,6 +75,18 @@ chown nobody.nobody \ /var/run/ovpnserver.log # Update OpenVPN/collectd configuration +files=`find /var/ipfire/ovpn/n2nconf/ -type d` +for i in $files; +do + if ! grep -q "status-version" $i/${i##*/}.conf; then + echo "# Logfile" >> $i/${i##*/}.conf + echo "status-version 1" >> $i/${i##*/}.conf + fi + if ! grep -q "status " $i/${i##*/}.conf; then + echo "status /var/run/openvpn/${i##*/}-n2n 10" >> $i/${i##*/}.conf + fi +done + /usr/sbin/ovpn-collectd-convert chown nobody.nobody /var/ipfire/ovpn/collectd.vpn -- 2.39.2