summaryrefslogtreecommitdiffstats
path: root/tcpproxy-model.lua
blob: 57bb84540c187fe3eef6d23ef6f6b7784d84d828 (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
27
28
29
30
31
32
module(..., package.seeall)

-- Load libraries
require("modelfunctions")

-- Set variables
local configfile = "/etc/tcpproxy.conf"
local processname = "tcpproxy"
local packagename = "tcpproxy"

-- ################################################################################
-- LOCAL FUNCTIONS

-- ################################################################################
-- PUBLIC FUNCTIONS

function startstop_service(action)
	return modelfunctions.startstop_service(processname, action)
end

function getstatus()
	return modelfunctions.getstatus(processname, packagename, "TCP Proxy Status")
end

function getconfigfile()
	return modelfunctions.getfiledetails(configfile)
end

function setconfigfile(filedetails)
	filedetails.value.filename.value = configfile
	return modelfunctions.setfiledetails(filedetails)
end