summaryrefslogtreecommitdiffstats
path: root/dovecot-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-12-31 21:15:25 +0000
committerTed Trask <ttrask01@yahoo.com>2008-12-31 21:15:25 +0000
commitba47f1e7c2d7494bbc9c424c4d40e100addf3005 (patch)
tree4797b867f9ff25e31f1c9b2ee4e8667e62afd36d /dovecot-controller.lua
downloadacf-dovecot-ba47f1e7c2d7494bbc9c424c4d40e100addf3005.tar.bz2
acf-dovecot-ba47f1e7c2d7494bbc9c424c4d40e100addf3005.tar.xz
Added dovecot controller with basic functionality.
git-svn-id: svn://svn.alpinelinux.org/acf/dovecot/trunk@1658 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'dovecot-controller.lua')
-rw-r--r--dovecot-controller.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/dovecot-controller.lua b/dovecot-controller.lua
new file mode 100644
index 0000000..859055f
--- /dev/null
+++ b/dovecot-controller.lua
@@ -0,0 +1,22 @@
+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 expert(self)
+ return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Dovecot Config", "Configuration Set")
+end