summaryrefslogtreecommitdiffstats
path: root/dnscache-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'dnscache-model.lua')
-rw-r--r--dnscache-model.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/dnscache-model.lua b/dnscache-model.lua
index d3db087..f098caf 100644
--- a/dnscache-model.lua
+++ b/dnscache-model.lua
@@ -68,7 +68,7 @@ function getstatus()
end
function getconfig()
- local conf = format.parse_configfile2(fs.read_file(configfile), "") or {}
+ local conf = format.parse_ini_file(fs.read_file(configfile), "") or {}
local output = {}
output.IPSEND = cfe({ value = conf.IPSEND or "", label="IP address for requests",
descr="Use 0.0.0.0 for default address" })
@@ -84,13 +84,13 @@ function setconfig(config)
if success then
local file = fs.read_file(configfile)
- file = format.update_configfile2(file,"","IPSEND",config.value.IPSEND.value)
- file = format.update_configfile2(file,"","CACHESIZE",config.value.CACHESIZE.value)
- file = format.update_configfile2(file,"","IP",config.value.IP.value)
+ file = format.update_ini_file(file,"","IPSEND",config.value.IPSEND.value)
+ file = format.update_ini_file(file,"","CACHESIZE",config.value.CACHESIZE.value)
+ file = format.update_ini_file(file,"","IP",config.value.IP.value)
if config.value.FORWARDONLY.value then
- file = format.update_configfile2(file,"","FORWARDONLY","true")
+ file = format.update_ini_file(file,"","FORWARDONLY","true")
else
- file = format.update_configfile2(file,"","FORWARDONLY","")
+ file = format.update_ini_file(file,"","FORWARDONLY","")
end
fs.write_file(configfile, file)
else