summaryrefslogtreecommitdiffstats
path: root/pingu-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-20 01:06:44 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-20 01:06:44 +0000
commit8b49a54dfe53bbc68c89147f43d24f3be2d8e1b4 (patch)
treeb20fd15ed5f52df93d016c793b6b1f7f1508208d /pingu-model.lua
parentf002085aa342bf1df6d37c67a63c54bee742101f (diff)
downloadacf-pingu-8b49a54dfe53bbc68c89147f43d24f3be2d8e1b4.tar.bz2
acf-pingu-8b49a54dfe53bbc68c89147f43d24f3be2d8e1b4.tar.xz
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition. This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'pingu-model.lua')
-rw-r--r--pingu-model.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/pingu-model.lua b/pingu-model.lua
index 223bb3d..d81f903 100644
--- a/pingu-model.lua
+++ b/pingu-model.lua
@@ -1,4 +1,4 @@
-module(..., package.seeall)
+local mymodule = {}
-- Load libraries
modelfunctions = require("modelfunctions")
@@ -18,22 +18,24 @@ local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
-- ################################################################################
-- PUBLIC FUNCTIONS
-function get_startstop(self, clientdata)
+function mymodule.get_startstop(self, clientdata)
return modelfunctions.get_startstop(processname)
end
-function startstop_service(self, startstop, action)
+function mymodule.startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end
-function getstatus()
+function mymodule.getstatus()
return modelfunctions.getstatus(processname, packagename, "Pingu Status")
end
-function get_filedetails()
+function mymodule.get_filedetails()
return modelfunctions.getfiledetails(configfile)
end
-function update_filedetails(self, filedetails)
+function mymodule.update_filedetails(self, filedetails)
return modelfunctions.setfiledetails(self, filedetails, {configfile})
end
+
+return mymodule