summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-10 03:22:45 +0000
committerColin Smith <colin@pfsense.org>2005-03-10 03:22:45 +0000
commit7ebb7114cdba25b0c456667ddea36bf9a45b5408 (patch)
tree751d8e5e1a7f23878202e55b3d02e6095c0df0a1 /etc
parentbe132052ec4a2a6c81f43507e926f7fd6664e36d (diff)
downloadpfsense-7ebb7114cdba25b0c456667ddea36bf9a45b5408.zip
pfsense-7ebb7114cdba25b0c456667ddea36bf9a45b5408.tar.gz
Add `grep -v grep` to is_service_running() and change threshold to >0.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 89c5ce6..8479e00 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -680,11 +680,11 @@ function get_package_xml_depends($pkg_name) {
* if the service is running returns 1.
*/
function is_service_running($service_name) {
- $status = `/bin/ps ax | grep {$service_name}`;
+ $status = `/bin/ps ax | grep {$service_name} | grep -v grep`;
$status_split = split("\n", $service_name);
$counter = 0;
foreach ($status_split as $ss) $counter++;
- if($counter > 1) return 1;
+ if($counter > 0) return 1;
return 0;
}
?>
OpenPOWER on IntegriCloud