From 0bb77f99d78599fd5a55856eb948b608385f7a35 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 13 Jul 2009 14:04:33 +0000 Subject: [PATCH] Modified status to check pid, because there is no init.d script. Bumped to revision 0.1.1 --- Makefile | 2 +- ppp-model.lua | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e762a42..e5c16f7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ APP_NAME=ppp PACKAGE=acf-$(APP_NAME) -VERSION=0.1.0 +VERSION=0.1.1 APP_DIST=\ ppp* \ diff --git a/ppp-model.lua b/ppp-model.lua index 0260533..31f7365 100644 --- a/ppp-model.lua +++ b/ppp-model.lua @@ -31,8 +31,14 @@ function getstatus() errtxt=errtxt, name=packagename }) - - status.status = modelfunctions.getenabled(processname) + + status.status = cfe({ label = "Program status", name=processname }) + local t = processinfo.pidof(processname) + if (t) and (#t > 0) then + status.status.value = "Started" + else + status.status.value = "Stopped" + end return cfe({ type="group", value=status, label="PPP Status" }) end -- GitLab