From a3145d278fc0afa97931d539f179a8eef969e6d0 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 22 Sep 2017 12:25:29 +0200 Subject: [PATCH] C-ICAP: fix templating in virus_scan.conf (#281) --- .../templates/OPNsense/CICAP/virus_scan.conf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/www/c-icap/src/opnsense/service/templates/OPNsense/CICAP/virus_scan.conf b/www/c-icap/src/opnsense/service/templates/OPNsense/CICAP/virus_scan.conf index 1dcc3fa67..6a170db7d 100644 --- a/www/c-icap/src/opnsense/service/templates/OPNsense/CICAP/virus_scan.conf +++ b/www/c-icap/src/opnsense/service/templates/OPNsense/CICAP/virus_scan.conf @@ -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