1 -- Copyright 2016 Eric Luehrsen <ericluehrsen@hotmail.com>
2 -- Licensed to the public under the Apache License 2.0.
4 local filename = "/etc/unbound/unbound_ext.conf"
7 m4 = SimpleForm("editing", nil)
8 m4.submit = translate("Save")
11 s4 = m4:section(SimpleSection, "Unbound Extended Conf",
12 translatef("This allows you to edit %s which is copied to"
13 .. " /var/ and 'include:' last for 'forward:' and other clauses", filename))
15 frm = s4:option(TextValue, "data")
16 frm.datatype = "string"
20 function frm.cfgvalue()
21 return nixio.fs.readfile(filename) or ""
25 function frm.write(self, section, data)
26 return nixio.fs.writefile(filename, data)