summaryrefslogtreecommitdiffstats
path: root/unbound-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-05-26 23:39:07 +0000
committerTed Trask <ttrask01@yahoo.com>2014-05-26 23:39:07 +0000
commit16ae49688035474711f4cc32d890ff4000bdee73 (patch)
treeb49927ab0309e1134f8158575b775772851ad41e /unbound-controller.lua
downloadacf-unbound-16ae49688035474711f4cc32d890ff4000bdee73.tar.bz2
acf-unbound-16ae49688035474711f4cc32d890ff4000bdee73.tar.xz
Initial commit of Unbound ACFv0.0.1
Basic support for status / startstop / expert / logfile Logfile assumes syslog and does not yet read the config for logfile location
Diffstat (limited to 'unbound-controller.lua')
-rw-r--r--unbound-controller.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/unbound-controller.lua b/unbound-controller.lua
new file mode 100644
index 0000000..cca194e
--- /dev/null
+++ b/unbound-controller.lua
@@ -0,0 +1,21 @@
+local mymodule = {}
+
+mymodule.default_action = "status"
+
+function mymodule.status(self)
+ return self.model.getstatus()
+end
+
+function mymodule.startstop(self)
+ return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
+end
+
+function mymodule.expert(self)
+ return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Unbound Config", "Configuration Set")
+end
+
+function mymodule.logfile(self)
+ return self.model.get_logfile()
+end
+
+return mymodule