summaryrefslogtreecommitdiffstats
path: root/tcpproxy-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tcpproxy-controller.lua')
-rw-r--r--tcpproxy-controller.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/tcpproxy-controller.lua b/tcpproxy-controller.lua
new file mode 100644
index 0000000..45044e0
--- /dev/null
+++ b/tcpproxy-controller.lua
@@ -0,0 +1,18 @@
+module(..., package.seeall)
+
+-- Load libraries
+require("controllerfunctions")
+
+default_action = "status"
+
+function status(self)
+ return self.model.getstatus()
+end
+
+function startstop(self)
+ return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.model.getstatus, self.clientdata)
+end
+
+function expert(self)
+ return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config", "Configuration Saved")
+end