summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/rrd.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-11 12:57:55 -0200
committerRenato Botelho <renato@netgate.com>2015-12-11 12:57:55 -0200
commitafb6ae0c7a94c8e40703f680d9609b08a9f89893 (patch)
tree33e40bff58034e82b24b79c4da63ac8f6d2682fd /src/etc/inc/rrd.inc
parent941939ee1fbf588395604f0c2805a0f3d4c30231 (diff)
downloadpfsense-afb6ae0c7a94c8e40703f680d9609b08a9f89893.zip
pfsense-afb6ae0c7a94c8e40703f680d9609b08a9f89893.tar.gz
Use $ values for vardb_path
Diffstat (limited to 'src/etc/inc/rrd.inc')
-rw-r--r--src/etc/inc/rrd.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc
index 0aa7152..3d27e8e 100644
--- a/src/etc/inc/rrd.inc
+++ b/src/etc/inc/rrd.inc
@@ -50,7 +50,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile) {
function restore_rrd() {
global $g, $config;
- $rrddbpath = "/var/db/rrd/";
+ $rrddbpath = "{$g['vardb_path']}/rrd/";
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
$rrdrestore = "";
@@ -211,7 +211,7 @@ function enable_rrd_graphing() {
echo gettext("Generating RRD graphs...");
}
- $rrddbpath = "/var/db/rrd/";
+ $rrddbpath = "{$g['vardb_path']}/rrd/";
$rrdgraphpath = "/usr/local/www/rrd";
$traffic = "-traffic.rrd";
@@ -323,11 +323,11 @@ function enable_rrd_graphing() {
}
if (platform_booting()) {
- if (!is_dir("{$g['vardb_path']}/rrd")) {
- mkdir("{$g['vardb_path']}/rrd", 0775);
+ if (!is_dir($rrddbpath)) {
+ mkdir($rrddbpath, 0775);
}
- @chown("{$g['vardb_path']}/rrd", "nobody");
+ @chown($rrddbpath, "nobody");
}
/* process all real and pseudo interfaces */
OpenPOWER on IntegriCloud