summaryrefslogtreecommitdiffstats
path: root/ipsectools-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ipsectools-controller.lua')
-rw-r--r--ipsectools-controller.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/ipsectools-controller.lua b/ipsectools-controller.lua
new file mode 100644
index 0000000..2a31dd6
--- /dev/null
+++ b/ipsectools-controller.lua
@@ -0,0 +1,25 @@
+module(..., package.seeall)
+
+-- This is the object/text used when we want to add a new record
+
+require("format")
+
+local list_redir = function (self)
+ self.conf.action = "status"
+ self.conf.type = "redir"
+ error (self.conf)
+end
+
+mvc = {}
+mvc.on_load = function(self, parent)
+ if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then
+ self.worker[self.conf.action] = list_redir(self)
+ end
+end
+
+-- ################################################################################
+-- PUBLIC FUNCTIONS
+function status(self)
+ return { status=self.model.getstatus() }
+end
+