core89: Fix update script again for OpenVPN configuration update

This commit is contained in:
Michael Tremer
2015-04-18 12:40:41 +02:00
parent 3a2e08b29d
commit 9ba3be2beb

View File

@@ -74,16 +74,18 @@ chown nobody.nobody \
/var/run/openvpn \
/var/run/ovpnserver.log
# Update OpenVPN/collectd configuration
# Update OpenVPN/collectd configuration
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 -qE "^status " ${i}; then
echo "status /var/run/openvpn/${i##*/}-n2n 10" >> ${i}
echo "status /var/run/openvpn/${name}-n2n 10" >> ${i}
fi
done