diff --git a/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml b/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml index d5c7fd421..578ad7b61 100644 --- a/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml +++ b/net/haproxy/src/opnsense/mvc/app/controllers/OPNsense/HAProxy/forms/dialogServer.xml @@ -77,7 +77,7 @@ server.checkInterval text - + true diff --git a/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml b/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml index 0b0466a04..aed80b1e6 100644 --- a/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml +++ b/net/haproxy/src/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.xml @@ -610,10 +610,9 @@ N - 2s /^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us". - Y + N /^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u @@ -658,12 +657,11 @@ SSL - - 250 - 1000000 - 1000 - Please specify a value between 250 and 1000000. - N + + 2s + /^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u + Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us". + Y diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index 1a111cd26..38a33290f 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -829,7 +829,12 @@ backend {{backend.name}} {# # check if health check is enabled #} {% if healthcheck_enabled == '1' %} {% do server_options.append('check') %} -{% do server_options.append('inter ' ~ server_data.checkInterval) %} +{# # server settings take precedence over healthcheck settings #} +{% if server_data.checkInterval|default("") != "" %} +{% do server_options.append('inter ' ~ server_data.checkInterval) %} +{% elif healthcheck_data.interval|default("") != "" %} +{% do server_options.append('inter ' ~ healthcheck_data.interval) %} +{% endif %} {# # use a different interval when server is in DOWN state #} {% if server_data.checkDownInterval|default("") != "" %} {% do server_options.append('downinter ' ~ server_data.checkDownInterval) %}