summaryrefslogtreecommitdiffstats
path: root/tcpproxy-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-08-15 20:33:28 +0000
committerTed Trask <ttrask01@yahoo.com>2008-08-15 20:33:28 +0000
commit4f7c42c67f5e22295d178b924861f150c35132c0 (patch)
treeaad8a6c8bf43390e697b4edff1c61470ad6c073b /tcpproxy-model.lua
downloadacf-tcpproxy-4f7c42c67f5e22295d178b924861f150c35132c0.tar.bz2
acf-tcpproxy-4f7c42c67f5e22295d178b924861f150c35132c0.tar.xz
New package for tcpproxy with status, startstop, and expert.
git-svn-id: svn://svn.alpinelinux.org/acf/tcpproxy/trunk@1381 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tcpproxy-model.lua')
-rw-r--r--tcpproxy-model.lua32
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