summaryrefslogtreecommitdiffstats
path: root/postfix-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-06-01 10:45:40 +0000
committerTed Trask <ttrask01@yahoo.com>2009-06-01 10:45:40 +0000
commiteb4c1b95e17e9e5bbde6cd057e6bd91355ad993b (patch)
treec713712501f4aec83bb2e71aa252146db2ac75d4 /postfix-model.lua
parentb84a1e82b71ba6a6ac1bf2b599c311c4c024cd08 (diff)
downloadacf-postfix-eb4c1b95e17e9e5bbde6cd057e6bd91355ad993b.tar.bz2
acf-postfix-eb4c1b95e17e9e5bbde6cd057e6bd91355ad993b.tar.xz
Attempted fix to status, was reporting stopped while still running.
Diffstat (limited to 'postfix-model.lua')
-rw-r--r--postfix-model.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/postfix-model.lua b/postfix-model.lua
index b54bce4..8dd92c6 100644
--- a/postfix-model.lua
+++ b/postfix-model.lua
@@ -55,9 +55,12 @@ function getstatus()
local tmp = string.match(fs.read_file(file) or "", "%d+")
if tmp then
local dir = "/proc/" .. tmp
- filetime = posix.stat(file, "ctime")
+ -- postfix seems to have a problem with changing times?
+ --[[ filetime = posix.stat(file, "ctime")
dirtime = posix.stat(dir, "ctime")
if dirtime and (tonumber(dirtime) - tonumber(filetime) < 100) then
+ --]]
+ if posix.stat(dir.."/cmdline") and string.find(fs.read_file(dir.."/cmdline"), processname) then
status.value.status.value = "Running"
end
end