summaryrefslogtreecommitdiffstats
path: root/etc/inc/service-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-05-30 19:50:36 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-05-30 19:50:36 +0000
commit5b67f7acd5a63167ada8d7cbae841310473bee04 (patch)
treebc2e64fc24f8d97d424e22dcfad9eb8a21e64627 /etc/inc/service-utils.inc
parent610b113684c4fb811a7b4a5cfd6d738ad9f127a5 (diff)
downloadpfsense-5b67f7acd5a63167ada8d7cbae841310473bee04.zip
pfsense-5b67f7acd5a63167ada8d7cbae841310473bee04.tar.gz
MFC 12461
"\t0\n" > 0, therefore is_process_running always returned 1. Btw, now it returns true or false, cause I don't see how it could be any different. Should just work now.
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r--etc/inc/service-utils.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index b34d5f1..1880bdc 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -133,9 +133,8 @@ function restart_service($name) {
}
function is_process_running($process) {
- $status = `/bin/ps awux | /usr/bin/grep {$process} | grep -v grep | wc -l`;
- if($status > 0) return 1;
- return 0;
+ $running = (trim(shell_exec("ps axwu | grep $process | grep -v grep")) != '');
+ return $running;
}
function is_dhcp_running($interface) {
OpenPOWER on IntegriCloud