From 16ae49688035474711f4cc32d890ff4000bdee73 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 26 May 2014 23:39:07 +0000 Subject: Initial commit of Unbound ACF Basic support for status / startstop / expert / logfile Logfile assumes syslog and does not yet read the config for logfile location --- unbound-controller.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 unbound-controller.lua (limited to 'unbound-controller.lua') 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 -- cgit v1.2.3