]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
vpn-statistic: move collectd.vpn to /var/ipfire/ovpn/
authorAlexander Marx <alexander.marx@ipfire.org>
Wed, 8 Apr 2015 17:20:13 +0000 (19:20 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Apr 2015 13:16:32 +0000 (15:16 +0200)
collectd.vpn needs to be within /var/ipfire/ovpn so that the
ovpnmain.cgi is able to write the status files from the n2n connections
to the file.

config/backup/include
config/rootfiles/common/collectd
config/rootfiles/core/89/update.sh
lfs/collectd

index cc9546f8ef29bf39b09e3ea120c6cc7a032d216c..d7a1d3a329b1773a9ead5d4352cd2f88629c5989 100644 (file)
@@ -4,6 +4,7 @@
 /var/ipfire/*/config
 /var/ipfire/*/enable
 /var/ipfire/*/*enable*
+/var/ipfire/ovpn/collectd.vpn
 /etc/passwd
 /etc/shadow
 /etc/group
index 72b2dee0336fdc56be788e5ec922e02483f3f8af..273249434d962bd38f90f82e5a21836474f6128c 100644 (file)
@@ -243,3 +243,4 @@ usr/share/collectd/types.db
 #usr/share/man/man5/collectd.conf.5
 #usr/share/man/man5/types.db.5
 #var/lib/collectd
+var/ipfire/ovpn/collectd.vpn
index d92349ed6f0f36b5ba6eb8ae688cea0bb9056b8b..9c6cce97856418ad52e7030cebee45da3ae974fd 100644 (file)
@@ -45,6 +45,9 @@ cat <<EOF >> /etc/sysconfig/createfiles
 /var/run/openvpn        dir     644     nobody  nobody
 EOF
 
+# Update /etc/collectd.conf
+echo "include \"/etc/collectd.vpn\"" >> /etc/collectd.conf
+
 # Generate ddns configuration file
 sudo -u nobody /srv/web/ipfire/cgi-bin/ddns.cgi
 
index f01c92a8a92ba956019f7b13d2ee3d7df10a9f6a..6f9c0e51534c9ae0d614efb1847dd95ee959f0d2 100644 (file)
@@ -112,6 +112,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                --with-librrd=/usr/share/rrdtool-1.2.30
        cd $(DIR_APP) && make install
        cp -vf $(DIR_SRC)/config/collectd/collectd.* /etc/
+       mv /etc/collectd.vpn /var/ipfire/ovpn/collectd.vpn
+       chown nobody.nobody /var/ipfire/ovpn/collectd.vpn
+       ln -f -s ../var/ipfire/ovpn/collectd.vpn /etc/collectd.vpn
        ln -f -s ../init.d/collectd /etc/rc.d/rc0.d/K50collectd 
        ln -f -s ../init.d/collectd /etc/rc.d/rc3.d/S29collectd
        ln -f -s ../init.d/collectd /etc/rc.d/rc6.d/K50collectd