diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-09-25 19:12:54 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-09-25 19:12:54 +0000 |
commit | 493d9b8bf842a8b7e781f1672d4792fb84c79b16 (patch) | |
tree | 81de47905ba8404d3cb54fcdd398f3897624dfa8 /lib/daemoncontrol.lua | |
parent | d7dd7e74c68f715655c5c4e497b9f82ef336202e (diff) | |
download | acf-core-493d9b8bf842a8b7e781f1672d4792fb84c79b16.tar.bz2 acf-core-493d9b8bf842a8b7e781f1672d4792fb84c79b16.tar.xz |
Moved procps and daemoncontrol functionality into processinfo.lua and deleted procps.lua and daemoncontrol.lua. This saves space on the server.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1519 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/daemoncontrol.lua')
-rw-r--r-- | lib/daemoncontrol.lua | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/daemoncontrol.lua b/lib/daemoncontrol.lua deleted file mode 100644 index db9423c..0000000 --- a/lib/daemoncontrol.lua +++ /dev/null @@ -1,18 +0,0 @@ -module (..., package.seeall) -require("posix") - -function daemoncontrol (process, action) - local cmdmessage = "" - if (string.lower(action) == "start") or (string.lower(action) == "stop") or (string.lower(action) == "restart") then - local file = io.popen( "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin /etc/init.d/" .. - process .. " " .. string.lower(action) .. " 2>&1" ) - if file ~= nil then - cmdmessage = file:read( "*a" ) - file:close() - end - else - return false,nil,"Unknown command!",action - end - posix.sleep(2) -- Wait for the process to start|stop - return true,cmdmessage,nil,action -end |