diff options
author | marcelloc <marcellocoutinho@gmail.com> | 2012-06-11 11:25:03 -0300 |
---|---|---|
committer | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-06-11 11:25:03 -0300 |
commit | 066c6309f567d21e046a999663437c323d39ed77 (patch) | |
tree | 899f26d29abf21cd45f8e08ecbda0d9286a0514d /config/havp | |
parent | 5197883317b9f82bc425e518aae583c2e5df46d8 (diff) | |
download | pfsense-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/havp')
-rw-r--r-- | config/havp/havp.inc | 14 |
1 files changed, 12 insertions, 2 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'); |