aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-07-03 16:57:39 -0400
committerjim-p <jimp@pfsense.org>2012-07-03 16:57:39 -0400
commit237af02494b76d4491622b2f850d2dd23d0ddf8b (patch)
treed0a363075c63acf28cf2cc33fe61219f1a96108c
parentd84076404b64a2738298db86adb8aef9035f5629 (diff)
downloadpfsense-packages-237af02494b76d4491622b2f850d2dd23d0ddf8b.tar.gz
pfsense-packages-237af02494b76d4491622b2f850d2dd23d0ddf8b.tar.bz2
pfsense-packages-237af02494b76d4491622b2f850d2dd23d0ddf8b.zip
ensure that the clamav db dir exists.
-rw-r--r--config/havp/havp.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/havp/havp.inc b/config/havp/havp.inc
index 51f3f11e..9603241c 100644
--- a/config/havp/havp.inc
+++ b/config/havp/havp.inc
@@ -103,6 +103,7 @@ define('HVDEF_HAVP_MAXSRV', '100');
# Clam
#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))
define('HVDEF_AVLOG_DIR', '/var/log/clamav');
else
@@ -396,6 +397,11 @@ function havp_check_system()
mwexec("mkdir -p " . HVDEF_HAVPTEMP_DIR);
havp_set_file_access(HVDEF_HAVPTEMP_DIR, HVDEF_USER, '');
+ # clamav dbdir
+ if (!file_exists(HVDEF_CLAM_DBDIR))
+ mwexec("mkdir -p " . HVDEF_CLAM_DBDIR);
+ havp_set_file_access(HVDEF_CLAM_DBDIR, HVDEF_AVUSER, '');
+
# RAM tempdir
if (!file_exists(HVDEF_RAMTEMP_DIR))
mwexec("mkdir -p " . HVDEF_RAMTEMP_DIR);