diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-12-31 15:49:13 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-12-31 15:49:13 +0000 |
commit | 693030035ed1152f8ec7144a622e9122c373c026 (patch) | |
tree | 01bcee7809da8ef5d874e36df96fea6bf474d25f /postfix-controller.lua | |
download | acf-postfix-693030035ed1152f8ec7144a622e9122c373c026.tar.bz2 acf-postfix-693030035ed1152f8ec7144a622e9122c373c026.tar.xz |
Added postfix controller with basic functionality.
git-svn-id: svn://svn.alpinelinux.org/acf/postfix/trunk@1655 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'postfix-controller.lua')
-rw-r--r-- | postfix-controller.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/postfix-controller.lua b/postfix-controller.lua new file mode 100644 index 0000000..682192d --- /dev/null +++ b/postfix-controller.lua @@ -0,0 +1,26 @@ +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 details(self) + return self.model.getstatusdetails() +end + +function listfiles(self) + return self.model.getfilelist() +end + +function expert(self) + return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Postfix File", "File Saved") +end |