From 21cd1918682363fb7912d632e269a589dd21aad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Sun, 4 Oct 2009 13:52:44 +0000 Subject: Correctly detect if a bgpd is running by removing grep spurious lines. --- config/openbgpd/openbgpd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/openbgpd') diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc index d88edade..3c67262b 100644 --- a/config/openbgpd/openbgpd.inc +++ b/config/openbgpd/openbgpd.inc @@ -234,7 +234,7 @@ EOF; } function is_openbgpd_running() { - $status = `ps awux | grep bgpd | grep "parent" | wc -l | awk '{ print \$1 }'`; + $status = `ps awux | grep bgpd | grep "parent" | grep -v grep | wc -l | awk '{ print \$1 }'`; if(intval($status) > 0) return true; else -- cgit v1.2.3