aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2012-06-11 11:25:03 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2012-06-11 11:25:03 -0300
commit066c6309f567d21e046a999663437c323d39ed77 (patch)
tree899f26d29abf21cd45f8e08ecbda0d9286a0514d /config
parent5197883317b9f82bc425e518aae583c2e5df46d8 (diff)
downloadpfsense-packages-066c6309f567d21e046a999663437c323d39ed77.tar.gz
pfsense-packages-066c6309f567d21e046a999663437c323d39ed77.tar.bz2
pfsense-packages-066c6309f567d21e046a999663437c323d39ed77.zip
keep havp and widget working on 2.0 and 2.1 pfsense versions
Diffstat (limited to 'config')
-rw-r--r--config/havp/havp.inc14
-rw-r--r--config/widget-antivirus/antivirus_status.widget.php7
2 files changed, 18 insertions, 3 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index b68aab7a..cd8e9d4f 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -77,7 +77,13 @@ define('HVDEF_MAXSCANSIZE', '5000000'); # [bytes] ! do not enter 0 o
define('HVDEF_MAXARCSCANSIZE', '5000000'); # [bytes] ! do not enter 0 or big size !
define('HVDEF_PID_FILE', '/var/run/havp.pid');
define('HVDEF_WORK_DIR', '/usr/local/etc/havp');
-define('HVDEF_LOG_DIR', '/var/log');
+
+$pfSversion = str_replace("\s", "", file_get_contents("/etc/version"));
+if(preg_match("/^2.0/",$pfSversion))
+ define('HVDEF_LOG_DIR', '/var/log/havp');
+else
+ define('HVDEF_LOG_DIR', '/var/log');
+
define('HVDEF_TEMP_DIR', '/var/tmp');
define('HVDEF_HAVPTEMP_DIR', HVDEF_TEMP_DIR.'/havp');
define('HVDEF_RAMTEMP_DIR', HVDEF_TEMP_DIR.'/havpRAM');
@@ -97,7 +103,11 @@ define('HVDEF_HAVP_MAXSRV', '100');
# Clam
#define('HVDEF_CLAM_RUNDIR', '/var/run/clamav');
define('HVDEF_CLAM_RUNDIR', '/var/run');
-define('HVDEF_AVLOG_DIR', '/var/log');
+if(preg_match("/^2.0/",$pfSversion))
+ define('HVDEF_AVLOG_DIR', '/var/log/clamav');
+else
+ define('HVDEF_AVLOG_DIR', '/var/log');
+
define('HVDEF_CLAM_SOCKET', HVDEF_CLAM_RUNDIR.'/clamd.sock');
define('HVDEF_CLAM_PID', HVDEF_CLAM_RUNDIR.'/clamd.pid');
define('HVDEF_CLAM_LOG', HVDEF_AVLOG_DIR . '/clamd.log');
diff --git a/config/widget-antivirus/antivirus_status.widget.php b/config/widget-antivirus/antivirus_status.widget.php
index 999ca416..c08ffeb8 100644
--- a/config/widget-antivirus/antivirus_status.widget.php
+++ b/config/widget-antivirus/antivirus_status.widget.php
@@ -36,7 +36,12 @@ require_once("pfsense-utils.inc");
require_once("functions.inc");
define('PATH_CLAMDB', '/var/db/clamav');
-define('PATH_HAVPLOG', '/var/log/access.log');
+$pfSversion = str_replace("\s", "", file_get_contents("/etc/version"));
+if(preg_match("/^2.0/",$pfSversion))
+ define('PATH_HAVPLOG', '/var/log/havp/access.log');
+else
+ define('PATH_HAVPLOG', '/var/log/access.log');
+
define('PATH_AVSTATUS', '/var/tmp/havp.status');