summaryrefslogtreecommitdiffstats
path: root/pingu-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-02-25 18:21:27 +0000
committerTed Trask <ttrask01@yahoo.com>2009-02-25 18:21:27 +0000
commit555fd1d7632bd06116a72aaa764e73073dcd3721 (patch)
treee8caf529f597977720b2a6cfcead4c487cfc35bf /pingu-model.lua
downloadacf-pingu-3f18bcf062c5330509c8f363bf17bf30d7fac917.tar.bz2
acf-pingu-3f18bcf062c5330509c8f363bf17bf30d7fac917.tar.xz
Added pingu ACF.v0.1.0
git-svn-id: svn://svn.alpinelinux.org/acf/pingu/trunk@1706 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'pingu-model.lua')
-rw-r--r--pingu-model.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/pingu-model.lua b/pingu-model.lua
new file mode 100644
index 0000000..75f26e2
--- /dev/null
+++ b/pingu-model.lua
@@ -0,0 +1,35 @@
+module(..., package.seeall)
+
+-- Load libraries
+require("modelfunctions")
+require("fs")
+require("format")
+
+-- Set variables
+local configfile = "/etc/pingu.conf"
+local processname = "pingu"
+local packagename = "pingu"
+
+local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
+
+-- ################################################################################
+-- LOCAL FUNCTIONS
+
+-- ################################################################################
+-- PUBLIC FUNCTIONS
+
+function startstop_service(action)
+ return modelfunctions.startstop_service(processname, action)
+end
+
+function getstatus()
+ return modelfunctions.getstatus(processname, packagename, "Pingu Status")
+end
+
+function get_filedetails()
+ return modelfunctions.getfiledetails(configfile)
+end
+
+function update_filedetails(filedetails)
+ return modelfunctions.setfiledetails(filedetails, {configfile})
+end