diff options
author | Ermal <eri@pfsense.org> | 2013-06-17 09:23:01 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-06-17 09:23:59 +0000 |
commit | 891dfb2496e390afb0fbc389c3652c6f3b62c09a (patch) | |
tree | fddb993675700027ed962d9b5fad5c5954b290f1 /etc/inc | |
parent | 1005484304a823b491f0111471f5d9a13bf83835 (diff) | |
download | pfsense-891dfb2496e390afb0fbc389c3652c6f3b62c09a.zip pfsense-891dfb2496e390afb0fbc389c3652c6f3b62c09a.tar.gz |
Use file_put_contents for simplicity and readbility
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/gwlb.inc | 4 |
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"); |