summaryrefslogtreecommitdiffstats
path: root/unbound-controller.lua
diff options
context:
space:
mode:
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