diff options
author | Ted Trask <ttrask01@yahoo.com> | 2015-10-31 19:04:15 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2015-10-31 19:04:15 +0000 |
commit | 0de33748d6b213e319fd21bd72732fa8a73be61d (patch) | |
tree | a95fda3b2b60786295d3c470ecff72135cd94f02 /openntpd-model.lua | |
parent | 3e0ed6b2b499898a7898bca42471c7b81bc39872 (diff) | |
download | acf-openntpd-0de33748d6b213e319fd21bd72732fa8a73be61d.tar.bz2 acf-openntpd-0de33748d6b213e319fd21bd72732fa8a73be61d.tar.xz |
Modify logfile to use common view
Diffstat (limited to 'openntpd-model.lua')
-rw-r--r-- | openntpd-model.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openntpd-model.lua b/openntpd-model.lua index f5607f5..5aec085 100644 --- a/openntpd-model.lua +++ b/openntpd-model.lua @@ -16,6 +16,8 @@ local processname = "ntpd" local function last_time_change() local cmdoutput = "(Have no data on updates)" + -- This works for busybox syslog, which always logs to /var/log/messages + -- FIXME to work with other syslog options local mess = fs.read_file_as_array("/var/log/messages") for i=table.maxn(mess),1,-1 do if string.find(mess[i], "ntpd.*adjusting") then @@ -162,4 +164,11 @@ function mymodule.update_filedetails(self, filedetails) return modelfunctions.setfiledetails(self, filedetails, {configfile}) end +function mymodule.get_logfile(self, clientdata) + local retval = cfe({ type="group", value={}, label="Log File Configuration" }) + retval.value.facility = cfe({value="daemon", label="Syslog Facility"}) + retval.value.grep = cfe({ value="ntpd", label="Grep" }) + return retval +end + return mymodule |