From eb4c1b95e17e9e5bbde6cd057e6bd91355ad993b Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 1 Jun 2009 10:45:40 +0000 Subject: Attempted fix to status, was reporting stopped while still running. --- postfix-model.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'postfix-model.lua') 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 -- cgit v1.2.3