core89: Do not add collectd include multiple times
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Apr 2015 20:28:42 +0000 (22:28 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Apr 2015 20:28:42 +0000 (22:28 +0200)
config/rootfiles/core/89/update.sh

index e15f937..713b5ef 100644 (file)
@@ -47,7 +47,9 @@ cat <<EOF >> /etc/sysconfig/createfiles
 EOF
 
 # Update /etc/collectd.conf
-echo "include \"/etc/collectd.vpn\"" >> /etc/collectd.conf
+if ! grep -q "collectd.vpn" /etc/collectd.conf; then
+       echo "include \"/etc/collectd.vpn\"" >> /etc/collectd.conf
+fi
 
 # Generate ddns configuration file
 sudo -u nobody /srv/web/ipfire/cgi-bin/ddns.cgi