aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig/dansguardian/dansguardian.inc15
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
3 files changed, 13 insertions, 6 deletions
diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc
index 0ef32a07..f61936a7 100755
--- a/config/dansguardian/dansguardian.inc
+++ b/config/dansguardian/dansguardian.inc
@@ -32,7 +32,13 @@ require_once("util.inc");
require("globals.inc");
#require("guiconfig.inc");
-$uname=posix_uname();
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version > 2.0)
+ define('DANSGUARDIAN_DIR', '/usr/pbi/dansguardian-' . php_uname("m"));
+else
+ define('DANSGUARDIAN_DIR', '/usr/local');
+
+ $uname=posix_uname();
if ($uname['machine']=='amd64')
ini_set('memory_limit', '250M');
@@ -423,7 +429,7 @@ function sync_package_dansguardian() {
file_put_contents($dansguardian_dir."/lists/logsitelist.".$dansguardian_site['name'],($dansguardian_site['urlsite_enabled']?dg_text_area_decode($config['installedpackages']['dansguardiansiteacl']['config'][$count]['log_sitelist']):""),LOCK_EX);
$count++;
}
-
+
#URL ACL
#create a default setup if not exists
if (!is_array($config['installedpackages']['dansguardianurlacl']['config']))
@@ -682,11 +688,12 @@ function sync_package_dansguardian() {
$dansguardian_log['report_file']=base64_encode($report_file);
$load_samples++;
}
+
#exception ip list
#create a default setup if not exists
if (!is_array($config['installedpackages']['dansguardianips']['config']))
- $config['installedpackages']['dansguardianips']['config'][0]=array();
- if($config['installedpackages']['dansguardianips']['config'][0]['exceptioniplist']){
+ $config['installedpackages']['dansguardianips']['config'][0]=array("exceptioniplist" => "");
+ if($config['installedpackages']['dansguardianips']['config'][0]['exceptioniplist'] == "" && file_exists ($dansguardian_dir.'/lists/exceptioniplist.sample')){
$config['installedpackages']['dansguardianips']['config'][0]['exceptioniplist']=base64_encode(file_get_contents($dansguardian_dir.'/lists/exceptioniplist.sample'));
$load_samples++;
}
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index d4718276..db0808fe 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -545,7 +545,7 @@
<depends_on_package>clamav-0.97.3_1.tbz</depends_on_package>
<depends_on_package>ca_root_nss-3.13.3.tbz</depends_on_package>
<depends_on_package_pbi>dansguardian-2.12.0.0_1-i386.pbi</depends_on_package_pbi>
- <version>2.12.0.0 pkg v.0.1.5.3</version>
+ <version>2.12.0.0 pkg v.0.1.5.4</version>
<status>beta</status>
<required_version>2.0</required_version>
<configurationfile>dansguardian.xml</configurationfile>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 548cfb36..ac3553e3 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -532,7 +532,7 @@
<depends_on_package>clamav-0.97.3_1.tbz</depends_on_package>
<depends_on_package>ca_root_nss-3.13.3.tbz</depends_on_package>
<depends_on_package_pbi>dansguardian-2.12.0.0_1-amd64.pbi</depends_on_package_pbi>
- <version>2.12.0.0 pkg v.0.1.5.3</version>
+ <version>2.12.0.0 pkg v.0.1.5.4</version>
<status>beta</status>
<required_version>2.0</required_version>
<configurationfile>dansguardian.xml</configurationfile>