aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy/haproxy.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-01-23 14:44:26 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-01-23 14:44:26 -0500
commit938978b9367ea481fb6ea720e39daf85a41824e4 (patch)
tree933054a8365f4f80a0b54a4266bce82e14a71ac6 /config/haproxy/haproxy.inc
parent1ed3e82fa6a8a84b8c9490168ca412016c8877b4 (diff)
downloadpfsense-packages-938978b9367ea481fb6ea720e39daf85a41824e4.tar.gz
pfsense-packages-938978b9367ea481fb6ea720e39daf85a41824e4.tar.bz2
pfsense-packages-938978b9367ea481fb6ea720e39daf85a41824e4.zip
Make nbproc a tunable item on global settings tab
Diffstat (limited to 'config/haproxy/haproxy.inc')
-rw-r--r--config/haproxy/haproxy.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 8e6984bf..5cf2c11f 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -115,7 +115,11 @@ function haproxy_configure() {
fwrite ($fd, "\tlog\t\t\t{$a_global['remotesyslog']}\n");
fwrite ($fd, "\tuid\t\t\t80\n");
fwrite ($fd, "\tgid\t\t\t80\n");
- $numprocs = trim(`/sbin/sysctl kern.smp.cpus | cut -d" " -f2`);
+ // Set numprocs if defined or use system default (#cores)
+ if($a_global['nbproc'])
+ $numprocs = $a_global['nbproc'];
+ else
+ $numprocs = trim(`/sbin/sysctl kern.smp.cpus | cut -d" " -f2`);
fwrite ($fd, "\tnbproc\t\t\t$numprocs\n");
fwrite ($fd, "\tchroot\t\t\t/var/empty\n");
fwrite ($fd, "\tdaemon\n");