diff options
Diffstat (limited to 'tinydns-model.lua')
-rw-r--r-- | tinydns-model.lua | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/tinydns-model.lua b/tinydns-model.lua index 176da46..223ce44 100644 --- a/tinydns-model.lua +++ b/tinydns-model.lua @@ -11,7 +11,7 @@ local configfile = "???" local function get_version() local cmd = "/sbin/apk_version -vs " .. processname .." 2>/dev/null" local f = io.popen( cmd ) - local cmd_output_result = f:read("*l") + local cmd_output_result = string.match(f:read("*l"),"^%S*") or "Unknown" f:close() return cmd_output_result end @@ -20,7 +20,6 @@ end -- PUBLIC FUNCTIONS function getstatus() --- local opts = getconfig() local status = {} status.version = cfe({ name = "version", label="Program version", @@ -30,21 +29,6 @@ function getstatus() label="Program status", value=procps.pidof(processname), }) - ---[[ - if (opts["remotelogging"]) and not ((opts["remotelogging"]["value"] ~= "") and not (opts["localandnetworklog"]["value"])) then - status.logfile = cfe({ name="logfile", - label="Locally logging to", - value=opts["logfile"]["value"], - }) - end - if (opts["SYSLOGD_OPTS"]) and (opts["SYSLOGD_OPTS"]["-R"]) and (opts["SYSLOGD_OPTS"]["-R"] ~= "") then - status.remote = cfe({ name="remotelogging", - label="Remote logging to", - value=opts["SYSLOGD_OPTS"]["-R"], - }) - end ---]] return status end |