aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy/haproxy.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-01-21 11:07:25 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-01-21 11:07:25 -0500
commitf61970dd0b335d12430eb4d2f2e6c896df111ca4 (patch)
tree1f781751f23f85aaccdda88c310f2c4033d5ef8d /config/haproxy/haproxy.inc
parent5ffe1ad2f94e8cb6d9aa50160ee3ee7d511f7192 (diff)
downloadpfsense-packages-f61970dd0b335d12430eb4d2f2e6c896df111ca4.tar.gz
pfsense-packages-f61970dd0b335d12430eb4d2f2e6c896df111ca4.tar.bz2
pfsense-packages-f61970dd0b335d12430eb4d2f2e6c896df111ca4.zip
Raise file open limits for haproxy if needed
Diffstat (limited to 'config/haproxy/haproxy.inc')
-rw-r--r--config/haproxy/haproxy.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 15a5a84d..8e6984bf 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -278,7 +278,13 @@ function haproxy_configure() {
// create config file
fclose($fd);
- exec("");
+ $freebsd_version = substr(trim(`uname -r`), 0, 1);
+ if(!file_exists("/usr/bin/limits")) {
+ exec("fetch -q -o /usr/bin/limits http://files.pfsense.org/extras/{$freebsd_version}/limits");
+ exec("chmod a+rx /usr/bin/limits");
+ }
+
+ exec("/usr/bin/limits -n 300014");
// reload haproxy
if(isset($a_global['enable'])) {