summaryrefslogtreecommitdiffstats
path: root/rc-controller.lua
blob: ba235b6840f01a8bfa95200192bb8ba5a7acc626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module (..., package.seeall)

require("controllerfunctions")

default_action = "status"

status = function(self)
	return self.model.status()
end

edit = function(self)
	return controllerfunctions.handle_form(self,
		function() return self.model.read_runlevels(self.clientdata.servicename) end,
		self.model.update_runlevels, self.clientdata, "Save", "Edit Service Runlevels")
end

startstop = function(self)
	return self:redirect_to_referrer(self.model.handle_startstop(self.clientdata.servicename, self.clientdata.action))
end