diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-09 11:54:00 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-09 11:54:00 +0000 |
commit | d7af70635c2c5d11061c60b7148ce11c2aecc318 (patch) | |
tree | c70ff9b338a98261dfa8e6284a150addc6dc931c /clamav-model.lua | |
parent | acf99a993a7ab9e893c0e7f34adefa44d1ef8695 (diff) | |
download | acf-clamav-d7af70635c2c5d11061c60b7148ce11c2aecc318.tar.bz2 acf-clamav-d7af70635c2c5d11061c60b7148ce11c2aecc318.tar.xz |
Look in config files to find logfile paths. Bumped to 0.2.2v0.2.2
Diffstat (limited to 'clamav-model.lua')
-rw-r--r-- | clamav-model.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clamav-model.lua b/clamav-model.lua index 22f5ea5..6735e1b 100644 --- a/clamav-model.lua +++ b/clamav-model.lua @@ -50,3 +50,20 @@ end function updatefiledetails(filedetails) return modelfunctions.setfiledetails(filedetails, filelist) end + +function getlogfile () + local files = {} + local logfilepath = format.parse_configfile(fs.read_file(filelist[1]) or "").LogFile + if not logfilepath then + files[#files+1] = {path = "/var/log/messages", grep = "clamd"} + else + files[#files+1] = {path=logfilepath} + end + logfilepath = format.parse_configfile(fs.read_file(filelist[2]) or "").UpdateLogFile + if not logfilepath then + files[#files+1] = {path = "/var/log/messages", grep = "freshclam"} + else + files[#files+1] = {path=logfilepath} + end + return cfe({ value=files, label="ClamAV logfiles" }) +end |