diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-01-21 11:07:25 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-01-21 11:07:25 -0500 |
commit | f61970dd0b335d12430eb4d2f2e6c896df111ca4 (patch) | |
tree | 1f781751f23f85aaccdda88c310f2c4033d5ef8d /config/haproxy/haproxy.inc | |
parent | 5ffe1ad2f94e8cb6d9aa50160ee3ee7d511f7192 (diff) | |
download | pfsense-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.inc | 8 |
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'])) { |