From 3199fd67b2526405ab2e73fa3e0be17e44c037b0 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Wed, 16 Apr 2008 12:08:50 +0000 Subject: Showing date/time as statusinformation git-svn-id: svn://svn.alpinelinux.org/acf/chrony/trunk@999 ab2d0c66-481e-0410-8bed-d214d4d58bed --- chrony-model.lua | 8 +++++++- chrony-status-html.lsp | 6 +++++- 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")

PROGRAM SPECIFIC OPTIONS/INFORMATION

- +
-- cgit v1.2.3