aboutsummaryrefslogtreecommitdiffstats
path: root/config/varnish3/varnish.inc
diff options
context:
space:
mode:
authorTorben Nielsen <torben@t-hoerup.dk>2013-03-03 16:52:01 +0100
committerTorben Nielsen <torben@t-hoerup.dk>2013-03-03 16:52:01 +0100
commitcb03cf432708da1e1f8edb0796ebd7fd87486c7c (patch)
tree2f301896d9d8d7fa8f096e3cd3dc81c5d8f162c2 /config/varnish3/varnish.inc
parentf7fb69e9c7906ec4275a822018d2da6582a59bfc (diff)
downloadpfsense-packages-cb03cf432708da1e1f8edb0796ebd7fd87486c7c.tar.gz
pfsense-packages-cb03cf432708da1e1f8edb0796ebd7fd87486c7c.tar.bz2
pfsense-packages-cb03cf432708da1e1f8edb0796ebd7fd87486c7c.zip
varnish3: Add gui option to disable backend probing
Diffstat (limited to 'config/varnish3/varnish.inc')
-rw-r--r--config/varnish3/varnish.inc24
1 files changed, 17 insertions, 7 deletions
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc
index 9d38161e..5ff2896f 100644
--- a/config/varnish3/varnish.inc
+++ b/config/varnish3/varnish.inc
@@ -329,6 +329,22 @@ function get_backend_config_txt() {
$probe_threshold = $backend['probe_threshold'];
else
$probe_threshold = "5";
+
+
+ if ($backend['probe_disable']) {
+ $probe = "";
+ } else {
+ $probe = <<<EOFPROBE
+ .probe = {
+ {$probe_url}
+ .interval = {$probe_interval};
+ .timeout = {$probe_timeout};
+ .window = {$probe_window};
+ .threshold = {$probe_threshold};
+ }
+EOFPROBE;
+ }
+
if (isset($probe_threshold)){
#last parameter set ,so write conf if backend is in use
if ($backends_in_use[$backend['backendname']] != ""){
@@ -340,13 +356,7 @@ backend {$backend['backendname']}BACKEND {
.port = "{$backend['port']}";
.first_byte_timeout = {$first_byte_timeout};
.connect_timeout = {$connect_timeout};
- .probe = {
- {$probe_url}
- .interval = {$probe_interval};
- .timeout = {$probe_timeout};
- .window = {$probe_window};
- .threshold = {$probe_threshold};
- }
+{$probe}
}