diff options
author | jim-p <jimp@pfsense.org> | 2011-06-17 13:53:42 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-17 13:53:42 -0400 |
commit | c41602e15ccb10cadb70d3295021a2208b0f4ba4 (patch) | |
tree | 49d628217e3a7d527e1675c5cf6419ed768ba3df /etc/inc | |
parent | 24cbe7a895c78ce12cde907ab4994630391567e0 (diff) | |
download | pfsense-c41602e15ccb10cadb70d3295021a2208b0f4ba4.zip pfsense-c41602e15ccb10cadb70d3295021a2208b0f4ba4.tar.gz |
Add a GUI field to adjust the max number of processes for lighttpd.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/system.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 3f6bc3a..4857ccf 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -739,8 +739,10 @@ function system_webgui_start() { } /* generate lighttpd configuration */ + $max_procs = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2; system_generate_lighty_config("{$g['varetc_path']}/lighty-webConfigurator.conf", - $crt, $key, $ca, "lighty-webConfigurator.pid", $portarg, "/usr/local/www/"); + $crt, $key, $ca, "lighty-webConfigurator.pid", $portarg, "/usr/local/www/", + "cert.pem", "ca.pem", $max_procs); /* attempt to start lighthttpd */ $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-webConfigurator.conf"); @@ -820,6 +822,7 @@ function system_generate_lighty_config($filename, } // Ramp up captive portal max procs + // Work relative to the default of 2, for values that would be >2. if($captive_portal == true) { if($avail > 65 and $avail < 98) { $max_procs = 1; @@ -828,13 +831,13 @@ function system_generate_lighty_config($filename, $max_procs = 2; } if($avail > 127 and $avail < 256) { - $max_procs = 3; + $max_procs += 1; } if($avail > 255 and $avail < 384) { - $max_procs = 4; + $max_procs += 2; } if($avail > 383) { - $max_procs = 5; + $max_procs += 3; } } |