diff --git a/config/rootfiles/core/89/update.sh b/config/rootfiles/core/89/update.sh index 90a6d776b..196e78bd2 100644 --- a/config/rootfiles/core/89/update.sh +++ b/config/rootfiles/core/89/update.sh @@ -75,15 +75,15 @@ 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 +# Update OpenVPN/collectd configuration +for i in /var/ipfire/ovpn/n2nconf/*/*.conf; do + 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/${i##*/}-n2n 10" >> ${i} fi done