diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-01-02 21:17:49 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-01-02 21:17:49 +0000 |
commit | 27408fa54e736cbcc741c3e41171d8f65b2848db (patch) | |
tree | 9cfa089e975880a50b12f6de029236c239792308 /gross-model.lua | |
download | acf-gross-27408fa54e736cbcc741c3e41171d8f65b2848db.tar.bz2 acf-gross-27408fa54e736cbcc741c3e41171d8f65b2848db.tar.xz |
Added gross controller with basic functionality.
git-svn-id: svn://svn.alpinelinux.org/acf/gross/trunk@1662 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'gross-model.lua')
-rw-r--r-- | gross-model.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gross-model.lua b/gross-model.lua new file mode 100644 index 0000000..c18fdcd --- /dev/null +++ b/gross-model.lua @@ -0,0 +1,39 @@ +module(..., package.seeall) + +-- Load libraries +require("modelfunctions") +require("fs") +require("format") + +-- Set variables +local configfile = "/etc/grossd.conf" +local processname = "grossd" +local packagename = "gross" + +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, "Gross Status") +end + +function getstatusdetails() + return cfe({ type="longtext", value="", label="Gross Status Details" }) +end + +function get_filedetails() + return modelfunctions.getfiledetails(configfile) +end + +function update_filedetails(filedetails) + return modelfunctions.setfiledetails(filedetails, {configfile}) +end |