diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-11-17 22:51:08 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-11-17 22:51:08 -0500 |
commit | 3115a6de1c24a9084a1e13dd9b21587a679b21e1 (patch) | |
tree | 65cd4e0731a7623efcb30402573a10b833ebf261 /config/haproxy/haproxy.inc | |
parent | cc28f054e65a3bbe0be3e6b279ef2971f97f2cd0 (diff) | |
download | pfsense-packages-3115a6de1c24a9084a1e13dd9b21587a679b21e1.tar.gz pfsense-packages-3115a6de1c24a9084a1e13dd9b21587a679b21e1.tar.bz2 pfsense-packages-3115a6de1c24a9084a1e13dd9b21587a679b21e1.zip |
Correct memory usage and simplify output
Diffstat (limited to 'config/haproxy/haproxy.inc')
-rw-r--r-- | config/haproxy/haproxy.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc index 652d0a63..e3028e4c 100644 --- a/config/haproxy/haproxy.inc +++ b/config/haproxy/haproxy.inc @@ -86,7 +86,7 @@ run_rc_command "\$1" EOD; - $fd = fopen("/usr/local/etc/rc.d/haproxy.sh", "w"); + $fd = fopen("/usr/local/etc/rc.d/haproxy.sh", "W"); fwrite($fd, $haproxy); fclose($fd); exec("chmod a+rx /usr/local/etc/rc.d/haproxy.sh"); @@ -119,6 +119,7 @@ function haproxy_configure() { fwrite ($fd, "\n"); } + // Construct and write out configuration file if(is_array($a_backends)) { foreach ($a_backends as $backend) { @@ -195,6 +196,7 @@ function haproxy_configure() { } fwrite ($fd, "\n"); } + // Sync HAProxy configuration (if enabled) if(isset($config['installedpackages']['haproxy']['enablesync'])) { if($config['installedpackages']['haproxy']['synchost1']) { haproxy_do_xmlrpc_sync($config['installedpackages']['haproxy']['synchost1'], |