summaryrefslogtreecommitdiffstats
path: root/chrony-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'chrony-model.lua')
-rw-r--r--chrony-model.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrony-model.lua b/chrony-model.lua
index 7ed494f..edfcb52 100644
--- a/chrony-model.lua
+++ b/chrony-model.lua
@@ -64,12 +64,18 @@ function getstatus()
errtxt=autostart_errtxt,
})
+ status.date = cfe({
+ name = "date",
+ label="Current time",
+ value=os.date(),
+ })
+
return status
end
function get_logfile ()
local file = {}
- local cmdtxt = "cat /var/log/messages | grep " .. processname
+ local cmdtxt = "grep ".. processname .. " /var/log/messages"
local cmd, error = io.popen(cmdtxt ,r)
local cmdoutput = cmd:read("*a")
cmd:close()