diff options
Diffstat (limited to 'tcpproxy-model.lua')
-rw-r--r-- | tcpproxy-model.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tcpproxy-model.lua b/tcpproxy-model.lua new file mode 100644 index 0000000..57bb845 --- /dev/null +++ b/tcpproxy-model.lua @@ -0,0 +1,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 |