summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrony-model.lua8
-rw-r--r--chrony-status-html.lsp6
2 files changed, 12 insertions, 2 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()
diff --git a/chrony-status-html.lsp b/chrony-status-html.lsp
index 2063b8a..43ee4db 100644
--- a/chrony-status-html.lsp
+++ b/chrony-status-html.lsp
@@ -20,5 +20,9 @@ displayinfo(myform,tags,"viewonly")
<H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2>
<DL>
-
+<?
+local myform = form.status
+local tags = { "date", }
+displayinfo(myform,tags,"viewonly")
+?>
</DL>