summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dnscache-model.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/dnscache-model.lua b/dnscache-model.lua
index a4835ea..aad55d8 100644
--- a/dnscache-model.lua
+++ b/dnscache-model.lua
@@ -80,12 +80,12 @@ function getstatus()
status.ip = cfe({ name="ip",
label="Listening on",
- value=config.IP,
+ value=config.IP or "",
})
status.cachesize = cfe({ name="cachesize",
label="Cache size",
- value=humanreadable(config.CACHESIZE),
+ value=humanreadable(config.CACHESIZE or ""),
})
return status
@@ -116,9 +116,9 @@ end
function getconfig()
if (fs.is_file(configfile)) then
- return getopts.getoptsfromfile(configfile)
+ return getopts.getoptsfromfile(configfile, "") or {}
end
- return false
+ return {}
end
function get_filedetails(self,num)