summaryrefslogtreecommitdiffstats
path: root/openssh-controller.lua
blob: 6a76512078b020a2fd9f2a3712b2c4232edcb28c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module(..., package.seeall)

-- Load libraries
require("controllerfunctions")

default_action = "status"

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

function config(self)
	return controllerfunctions.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Saved")
end

function startstop(self)
	return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.model.getstatus, self.clientdata)
end

function expert(self)
	return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config", "Configuration Saved")
end

function connectedpeers(self)
	return self.model.list_conn_peers()
end