summaryrefslogtreecommitdiffstats
path: root/lighttpd-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lighttpd-controller.lua')
-rw-r--r--lighttpd-controller.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/lighttpd-controller.lua b/lighttpd-controller.lua
new file mode 100644
index 0000000..72da42e
--- /dev/null
+++ b/lighttpd-controller.lua
@@ -0,0 +1,33 @@
+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.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 Lighttpd
+File", "File Saved")
+end
+
+function logfile(self)
+ return self.model.getlogfile()
+end