diff options
author | Colin Smith <colin@pfsense.org> | 2005-08-06 23:17:24 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-08-06 23:17:24 +0000 |
commit | d96e7a05ad1a81b665729d6eb0441642d3d3be87 (patch) | |
tree | 70318cf7f39b905b6548cc64f755cf76de6e484f /etc/inc | |
parent | 506672630f540e21dca5eb054acba432960a3030 (diff) | |
download | pfsense-d96e7a05ad1a81b665729d6eb0441642d3d3be87.zip pfsense-d96e7a05ad1a81b665729d6eb0441642d3d3be87.tar.gz |
is_process_running():
* grep -v grep
* 2 -> 0
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/service-utils.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 0787b20..2c9b117 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -123,8 +123,8 @@ function restart_service($name) { } function is_process_running($process) { - $status = `/bin/ps ax | /usr/bin/grep {$process} | wc -l`; - if($status > 2) return 1; + $status = `/bin/ps ax | /usr/bin/grep {$process} | grep -v grep | wc -l`; + if($status > 0) return 1; return 0; } |