From 8608998a9afa5bf2b2fcd6634bbae1f8def9d627 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 3 Jul 2012 18:55:03 -0400 Subject: Make sure the log dir for clamav exists too (and 2.1 is also 2.x, old test wasn't proper) --- config/havp/havp.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config/havp') diff --git a/config/havp/havp.inc b/config/havp/havp.inc index 9603241c..30aef193 100644 --- a/config/havp/havp.inc +++ b/config/havp/havp.inc @@ -104,7 +104,7 @@ define('HVDEF_HAVP_MAXSRV', '100'); #define('HVDEF_CLAM_RUNDIR', '/var/run/clamav'); define('HVDEF_CLAM_RUNDIR', '/var/run'); define('HVDEF_CLAM_DBDIR', '/var/db/clamav'); -if(preg_match("/^2.0/",$pfSversion)) +if(preg_match("/^2./",$pfSversion)) define('HVDEF_AVLOG_DIR', '/var/log/clamav'); else define('HVDEF_AVLOG_DIR', '/var/log'); @@ -431,6 +431,8 @@ function havp_check_system() if (!file_exists(HVDEF_CLAM_LOG)) file_put_contents(HVDEF_CLAM_LOG, ''); if (!file_exists(HVDEF_FRESHCLAM_LOG)) file_put_contents(HVDEF_FRESHCLAM_LOG, ''); # log dir permissions + if (!file_exists(HVDEF_AVLOG_DIR)) + mwexec("mkdir -p " . HVDEF_AVLOG_DIR); havp_set_file_access(HVDEF_AVLOG_DIR, HVDEF_USER, '0777'); # =-= ClamAV =-= -- cgit v1.2.3