From 6b7cbc8f335106a0d8e8860f343a51bda8e14dbb Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Wed, 8 Apr 2015 19:20:13 +0200 Subject: [PATCH] vpn-statistic: move collectd.vpn to /var/ipfire/ovpn/ 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 | 1 + config/rootfiles/common/collectd | 1 + config/rootfiles/core/89/update.sh | 3 +++ lfs/collectd | 3 +++ 4 files changed, 8 insertions(+) diff --git a/config/backup/include b/config/backup/include index cc9546f8ef..d7a1d3a329 100644 --- a/config/backup/include +++ b/config/backup/include @@ -4,6 +4,7 @@ /var/ipfire/*/config /var/ipfire/*/enable /var/ipfire/*/*enable* +/var/ipfire/ovpn/collectd.vpn /etc/passwd /etc/shadow /etc/group diff --git a/config/rootfiles/common/collectd b/config/rootfiles/common/collectd index 72b2dee033..273249434d 100644 --- a/config/rootfiles/common/collectd +++ b/config/rootfiles/common/collectd @@ -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 diff --git a/config/rootfiles/core/89/update.sh b/config/rootfiles/core/89/update.sh index d92349ed6f..9c6cce9785 100644 --- a/config/rootfiles/core/89/update.sh +++ b/config/rootfiles/core/89/update.sh @@ -45,6 +45,9 @@ cat <> /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 diff --git a/lfs/collectd b/lfs/collectd index f01c92a8a9..6f9c0e5153 100644 --- a/lfs/collectd +++ b/lfs/collectd @@ -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 -- 2.39.2