aboutsummaryrefslogtreecommitdiffstats
path: root/config/varnish64/varnish.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-04-27 15:14:49 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-04-27 15:14:49 -0400
commitab90376264f9344a3c95579b15ee7932e43fc179 (patch)
treea684863db3b9ff48de90d17e74e819a581fc70d1 /config/varnish64/varnish.inc
parent1aaa4ab545f2465421c4b2020b599b8bc05ddd5e (diff)
downloadpfsense-packages-ab90376264f9344a3c95579b15ee7932e43fc179.tar.gz
pfsense-packages-ab90376264f9344a3c95579b15ee7932e43fc179.tar.bz2
pfsense-packages-ab90376264f9344a3c95579b15ee7932e43fc179.zip
Allow defining of minworkers, maxworkers and timeoutworkers values for the number of operating threads
Diffstat (limited to 'config/varnish64/varnish.inc')
-rw-r--r--config/varnish64/varnish.inc16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc
index 5011d878..4bdd06ed 100644
--- a/config/varnish64/varnish.inc
+++ b/config/varnish64/varnish.inc
@@ -54,7 +54,19 @@ function sync_package_varnish() {
if($vs['listeningport'])
$listeningport = "-a :{$vs['listeningport']}";
else
- $listeningport = "-a :80";
+ $listeningport = "-a :80";
+ if($vs['minworkers'])
+ $minworkers = "{$vs['minworkers']}";
+ else
+ $minworkers = "200";
+ if($vs['maxworkers'])
+ $maxworkers = "{$vs['maxworkers']}";
+ else
+ $maxworkers = "4000";
+ if($vs['timeoutworkers'])
+ $timeoutworkers = "{$vs['timeoutworkers']}";
+ else
+ $timeoutworkers = "50";
}
$fd = fopen("/usr/local/etc/rc.d/varnish.sh", "w");
$rc_file = <<<EOF
@@ -67,7 +79,7 @@ sleep 1
{$listeningport} \
-f /var/etc/default.vcl \
{$storage_type} \
- -w 200,4000,50
+ -w {$minworkers},{$maxworkers},{$timeoutworkers}
EOF;
fwrite($fd, $rc_file);