Commit a6ca7de3 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(proxy) fix template errors when nothing is configured

(cherry picked from commit 6c2e1467)
parent ff37598f
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
{% if OPNsense.proxy.general.enabled|default("0") == "1" %}
{% if helpers.exists('OPNsense.proxy.general.enabled') and OPNsense.proxy.general.enabled|default("0") == "1" %}
/var/log/squid/access.log squid:squid 644 14 * @T00 ZB /var/run/squid/squid.pid 30
/var/log/squid/cache.log squid:squid 644 2 * @T00 ZB /var/run/squid/squid.pid 30
/var/log/squid/store.log squid:squid 644 2 * @T00 ZB /var/run/squid/squid.pid 30
......
squid_enable={% if OPNsense.proxy.general.enabled|default("0") == "1" %}YES{% else %}NO{% endif %}
squid_enable={% if helpers.exists('OPNsense.proxy.general.enabled') and OPNsense.proxy.general.enabled|default("0") == "1" %}YES{% else %}NO{% endif %}
squid_opnsense_bootup_run="/usr/local/opnsense/scripts/proxy/setup.sh"
......@@ -3,7 +3,7 @@
# Do not edit this file manually.
# setup listen configuration
{%if OPNsense.proxy.forward.transparentMode == '1' %}
{% if helpers.exists('OPNsense.proxy.forward.transparentMode') and OPNsense.proxy.forward.transparentMode == '1' %}
# transparant mode, listen on localhost
http_port 127.0.0.1:{{ OPNsense.proxy.forward.port }} intercept
{% endif %}
......@@ -276,7 +276,9 @@ cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.
{% endif %}
{% endif %}
{% if helpers.exists('OPNsense.proxy.general.cache.local') %}
cache_mem {{ OPNsense.proxy.general.cache.local.cache_mem|default('256') }} MB
{% endif %}
# Leave coredumps in the first cache dir
coredump_dir /var/squid/cache
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment