aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-07-25 02:21:59 -0500
committerChris Buechler <cmb@pfsense.org>2015-07-25 02:21:59 -0500
commit9196b0a78e64bb00f072a2ba3403f8cf249b1eee (patch)
tree752e05348c17e7539615130e43526bef9f7f5566 /config
parentfefbc4f3a8b106122dd759987d8759a4560ce6fc (diff)
parenta5762a3a64237233908d3741bc6fb1a888bac307 (diff)
downloadpfsense-packages-9196b0a78e64bb00f072a2ba3403f8cf249b1eee.tar.gz
pfsense-packages-9196b0a78e64bb00f072a2ba3403f8cf249b1eee.tar.bz2
pfsense-packages-9196b0a78e64bb00f072a2ba3403f8cf249b1eee.zip
Merge pull request #871 from ncolunga/patch-1
Diffstat (limited to 'config')
-rw-r--r--config/havp/havp.inc18
1 files changed, 12 insertions, 6 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index 1648bcb0..e7966a38 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -76,7 +76,13 @@ define('HVDEF_PROXYPORT', '8080');
define('HVDEF_MAXSCANSIZE', '5000000'); # [bytes] ! do not enter 0 or big size !
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');
+
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version == "2.1" || $pf_version == "2.2")
+ define("HVDEF_WORK_DIR", "/usr/pbi/havp-" . php_uname("m") . "/local/etc");
+ else
+ define("HVDEF_WORK_DIR", "/usr/local/etc/havp");
+
$pfSversion = str_replace("\s", "", file_get_contents("/etc/version"));
if(preg_match("/^2./",$pfSversion))
@@ -101,8 +107,8 @@ define('HVDEF_HAVP_MINSRV', '3');
define('HVDEF_HAVP_MAXSRV', '100');
# Clam
-#define('HVDEF_CLAM_RUNDIR', '/var/run/clamav');
-define('HVDEF_CLAM_RUNDIR', '/var/run');
+define('HVDEF_CLAM_RUNDIR', '/var/run/clamav');
+#define('HVDEF_CLAM_RUNDIR', '/var/run');
define('HVDEF_CLAM_DBDIR', '/var/db/clamav');
if(preg_match("/^2./",$pfSversion))
define('HVDEF_AVLOG_DIR', '/var/log/clamav');
@@ -446,9 +452,9 @@ function havp_check_system()
# =-= ClamAV =-=
# catalog for Pid and Socket files
-# if (!file_exists(HVDEF_CLAM_RUNDIR))
-# mwexec("mkdir -p " . HVDEF_CLAM_RUNDIR);
-# havp_set_file_access(HVDEF_CLAM_RUNDIR, HVDEF_USER, '0774');
+ if (!file_exists(HVDEF_CLAM_RUNDIR))
+ mwexec("mkdir -p " . HVDEF_CLAM_RUNDIR);
+ havp_set_file_access(HVDEF_CLAM_RUNDIR, HVDEF_USER, '0774');
# AV update script
file_put_contents(HVDEF_AVUPD_SCRIPT, havp_AVupdate_script());