From 3cd3cbd2b1bc984d39659be2acc66c73ccea250b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 27 Nov 2014 15:28:32 +0545 Subject: Setup rrd dir before calling create_gateway_quality_rrd Stops error: ERROR: opening '/var/db/rrd/WAN_DHCP-quality.rrd': No such file or directory in system log during boot. Forum: https://forum.pfsense.org/index.php?topic=84627.0 --- etc/inc/gwlb.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'etc') diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 33ec09c..0cd31f3 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -151,6 +151,13 @@ target default { EOD; + if (is_dir("{$g['tmp_path']}")) + chmod("{$g['tmp_path']}", 01777); + if (!is_dir("{$g['vardb_path']}/rrd")) + mkdir("{$g['vardb_path']}/rrd", 0775); + + @chown("{$g['vardb_path']}/rrd", "nobody"); + $monitor_ips = array(); foreach($gateways_arr as $name => $gateway) { /* Do not monitor if such was requested */ @@ -337,13 +344,6 @@ EOD; @file_put_contents("{$g['varetc_path']}/apinger.conf", $apingerconfig); unset($apingerconfig); - if (is_dir("{$g['tmp_path']}")) - chmod("{$g['tmp_path']}", 01777); - if (!is_dir("{$g['vardb_path']}/rrd")) - mkdir("{$g['vardb_path']}/rrd", 0775); - - @chown("{$g['vardb_path']}/rrd", "nobody"); - /* Restart apinger process */ if (isvalidpid("{$g['varrun_path']}/apinger.pid")) sigkillbypid("{$g['varrun_path']}/apinger.pid", "HUP"); -- cgit v1.1