summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-06-17 09:23:01 +0000
committerErmal <eri@pfsense.org>2013-06-17 09:23:01 +0000
commitde82ec90abcb777d5004a179a807d9d5becd7529 (patch)
treee7189d8ac9a619bf43f1b814980035b733494052 /etc/inc/gwlb.inc
parent06886ae39b1079733344f75427966ed6d11e1fc9 (diff)
downloadpfsense-de82ec90abcb777d5004a179a807d9d5becd7529.zip
pfsense-de82ec90abcb777d5004a179a807d9d5becd7529.tar.gz
Use file_put_contents for simplicity and readbility
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc4
1 files changed, 1 insertions, 3 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index e703893..15ebd24 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -58,7 +58,6 @@ function setup_gateways_monitor() {
}
$apinger_default = return_apinger_defaults();
- $fd = fopen("{$g['varetc_path']}/apinger.conf", "w");
$apingerconfig = <<<EOD
# pfSense apinger configuration file. Automatically Generated!
@@ -254,8 +253,7 @@ EOD;
$apingerconfig .= $alarmscfg;
$apingerconfig .= $apingercfg;
}
- fwrite($fd, $apingerconfig);
- fclose($fd);
+ @file_put_contents("{$g['varetc_path']}/apinger.conf", $apingerconfig);
unset($apingerconfig);
killbypid("{$g['varrun_path']}/apinger.pid");
OpenPOWER on IntegriCloud