diff options
author | Jim P <jim@pingle.org> | 2013-03-03 09:26:49 -0800 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2013-03-03 09:26:49 -0800 |
commit | b6e2a34c81676ecc62a43de5ac5f277d055f55c2 (patch) | |
tree | 4d9dc7e8dd5c035882f7e3874d4bc7889892605e /config | |
parent | afff954fdff392065c481fb7f8196ad38db855b1 (diff) | |
parent | cb03cf432708da1e1f8edb0796ebd7fd87486c7c (diff) | |
download | pfsense-packages-b6e2a34c81676ecc62a43de5ac5f277d055f55c2.tar.gz pfsense-packages-b6e2a34c81676ecc62a43de5ac5f277d055f55c2.tar.bz2 pfsense-packages-b6e2a34c81676ecc62a43de5ac5f277d055f55c2.zip |
Merge pull request #393 from hoerup/master
varnish3: Add gui option to disable backend probing
Diffstat (limited to 'config')
-rw-r--r-- | config/varnish3/varnish.inc | 24 | ||||
-rw-r--r-- | config/varnish3/varnish_backends.xml | 8 |
2 files changed, 24 insertions, 8 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} } diff --git a/config/varnish3/varnish_backends.xml b/config/varnish3/varnish_backends.xml index e35ef07b..e480a8d6 100644 --- a/config/varnish3/varnish_backends.xml +++ b/config/varnish3/varnish_backends.xml @@ -11,7 +11,7 @@ Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com> Copyright (C) 2011 Marcello Coutinho All rights reserved. -*/ +/*/ /* ========================================================================== */ /* Redistribution and use in source and binary forms, with or without @@ -221,6 +221,12 @@ <type>input</type> </field> <field> + <fielddescr>Disable Probe</fielddescr> + <fieldname>probe_disable</fieldname> + <description>Check to disable probing for this backend</description> + <type>checkbox</type> + </field> + <field> <fielddescr>Mappings</fielddescr> <fieldname>Mappings</fieldname> <type>listtopic</type> |