From: Arne Fitzenreiter Date: Fri, 8 May 2015 16:31:47 +0000 (+0200) Subject: Merge branch 'next' X-Git-Tag: v2.17-core91~30^2^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fd3387aec57a23e43a70531aba3b58bbb11b19f;hp=16c18d2ea06f833cec3ea7058b8ebd0368b685ba;p=people%2Fpmueller%2Fipfire-2.x.git Merge branch 'next' --- diff --git a/config/rootfiles/core/89/update.sh b/config/rootfiles/core/89/update.sh index 90a6d776b0..13c645a1a2 100644 --- a/config/rootfiles/core/89/update.sh +++ b/config/rootfiles/core/89/update.sh @@ -75,15 +75,17 @@ 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 +for i in /var/ipfire/ovpn/n2nconf/*/*.conf; do + name="${i##*/}" + name="${name%*.conf}" + + if ! grep -qE "^status-version" ${i}; then + echo "# Logfile" >> ${i} + echo "status-version 1" >> ${i} fi - if ! grep -q "status " $i/${i##*/}.conf; then - echo "status /var/run/openvpn/${i##*/}-n2n 10" >> $i/${i##*/}.conf + + if ! grep -qE "^status " ${i}; then + echo "status /var/run/openvpn/${name}-n2n 10" >> ${i} fi done