diff options
author | Phil Davis <phil.davis@inf.org> | 2014-11-27 15:28:32 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-11-27 15:28:32 +0545 |
commit | 3cd3cbd2b1bc984d39659be2acc66c73ccea250b (patch) | |
tree | 81413a766b100389e0f2ff5c0cdd6a814d4ee86c /etc/inc/gwlb.inc | |
parent | a7f79eda30c2fab052ce0fd06e31f0d0e11fcb83 (diff) | |
download | pfsense-3cd3cbd2b1bc984d39659be2acc66c73ccea250b.zip pfsense-3cd3cbd2b1bc984d39659be2acc66c73ccea250b.tar.gz |
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
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 14 |
1 files changed, 7 insertions, 7 deletions
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"); |