From 1bb38a94a222ea4e9a6ed0602579f4beaee91ddc Mon Sep 17 00:00:00 2001 From: Randy Crowder Date: Wed, 16 Oct 2013 13:45:36 -0400 Subject: Modified to save icap scanning URL and contentscannertimeout value --- config/dansguardian/dansguardian.inc | 3 +++ config/dansguardian/dansguardian.xml | 5 +++++ config/dansguardian/dansguardian_config.xml | 2 +- config/dansguardian/icapscan.conf.template | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 config/dansguardian/icapscan.conf.template diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc index 12c2af93..b31df8ab 100755 --- a/config/dansguardian/dansguardian.inc +++ b/config/dansguardian/dansguardian.inc @@ -185,6 +185,7 @@ function sync_package_dansguardian($via_rpc="no",$install_process=false) { $icapscan=(preg_match('/icapscan/',$dansguardian_config['content_scanners'])?"on":"off"); $contentscannertimeout=($dansguardian_config['contentscannertimeout']?$dansguardian_config['contentscannertimeout']:"60"); $contentscanexceptions=($dansguardian_config['contentscanexceptions']?"on":"off"); + $icapurl=($dansguardian_config['icapurl']?$dansguardian_config['icapurl']:"icap://icapserver:1344/avscan"); $recheckreplacedurls=(preg_match('/recheckreplacedurls/',$dansguardian_config['misc_options'])?"on":"off"); $forwardedfor=(preg_match('/forwardedfor/',$dansguardian_config['misc_options'])?"on":"off"); $recheckreplacedurls=(preg_match('/icapscan/',$dansguardian_config['misc_options'])?"on":"off"); @@ -974,6 +975,7 @@ EOF; $filterip=($filterip==""?"filterip = ":$filterip); $filterports=($filterports==""?"filterports = $filterport":$filterports); include("/usr/local/pkg/dansguardian.conf.template"); + include("/usr/local/pkg/icapscan.conf.template"); #check cron_tab $new_cron=array(); @@ -1111,6 +1113,7 @@ EOF; #create config files file_put_contents($dansguardian_dir."/dansguardian.conf", $dg, LOCK_EX); + file_put_contents($dansguardian_dir."/contentscanners/icapscan.conf", $icapconf, LOCK_EX); #check virus_scanner options $libexec_dir= DANSGUARDIAN_DIR."/libexec/dansguardian/"; diff --git a/config/dansguardian/dansguardian.xml b/config/dansguardian/dansguardian.xml index 34d4156c..e0cb58fd 100644 --- a/config/dansguardian/dansguardian.xml +++ b/config/dansguardian/dansguardian.xml @@ -183,6 +183,11 @@ /usr/local/pkg/ 0755 + + http://www.pfsense.org/packages/config/dansguardian/icapscan.conf.template + /usr/local/pkg/ + 0755 + http://www.pfsense.org/packages/config/dansguardian/dansguardian_rc.template /usr/local/pkg/ diff --git a/config/dansguardian/dansguardian_config.xml b/config/dansguardian/dansguardian_config.xml index 35b0bf5b..342b52d7 100644 --- a/config/dansguardian/dansguardian_config.xml +++ b/config/dansguardian/dansguardian_config.xml @@ -274,7 +274,7 @@ ICAP URL - contentscannertimeout + icapurl input 40 icap://icapserver:1344/avscan format
diff --git a/config/dansguardian/icapscan.conf.template b/config/dansguardian/icapscan.conf.template new file mode 100755 index 00000000..b4289dc1 --- /dev/null +++ b/config/dansguardian/icapscan.conf.template @@ -0,0 +1,16 @@ + -- cgit v1.2.3