C-ICAP: fix templating in virus_scan.conf (#281)

This commit is contained in:
Michael
2017-09-22 12:25:29 +02:00
committed by Franco Fichtner
parent 6533c6baa3
commit a3145d278f
@@ -8,19 +8,23 @@ virus_scan.ScanFileTypes {{ OPNsense.cicap.antivirus.scanfiletypes.replace(',',
{% endif %}
{% if helpers.exists('OPNsense.cicap.antivirus.sendpercentdata') and OPNsense.cicap.antivirus.sendpercentdata != '' %}
virus_scan.SendPercentData 5
virus_scan.SendPercentData {{ OPNsense.cicap.antivirus.sendpercentdata }}
{% endif %}
{% if helpers.exists('OPNsense.cicap.antivirus.startsendpercentdataafter') and OPNsense.cicap.antivirus.startsendpercentdataafter != '' %}
virus_scan.StartSendPercentDataAfter 2M
virus_scan.StartSendPercentDataAfter {{ OPNsense.cicap.antivirus.startsendpercentdataafter }}
{% endif %}
{% if helpers.exists('OPNsense.cicap.antivirus.allow204responses') and OPNsense.cicap.antivirus.allow204responses != '' %}
{% if helpers.exists('OPNsense.cicap.antivirus.allow204responses') and OPNsense.cicap.antivirus.allow204responses == '1' %}
virus_scan.Allow204Responces on
{% else %}
virus_scan.Allow204Responces off
{% endif %}
{% if helpers.exists('OPNsense.cicap.antivirus.passonerror') and OPNsense.cicap.antivirus.passonerror != '' %}
{% if helpers.exists('OPNsense.cicap.antivirus.passonerror') and OPNsense.cicap.antivirus.passonerror == '1' %}
virus_scan.PassOnError on
{% else %}
virus_scan.PassOnError off
{% endif %}
{% if helpers.exists('OPNsense.cicap.antivirus.maxobjectsize') and OPNsense.cicap.antivirus.maxobjectsize != '' %}
virus_scan.MaxObjectSize 5M
virus_scan.MaxObjectSize {{ OPNsense.cicap.antivirus.maxobjectsize }}
{% endif %}
Module common clamd_mod.so
clamd_mod.ClamdHost 127.0.0.1