[icinga-checkins] icinga.org: icinga-core/fholzer/core: Don't use grep|grep -v grep

git at icinga.org git at icinga.org
Mon Apr 23 08:00:06 CEST 2012


Module: icinga-core
Branch: fholzer/core
Commit: 907b9d70c229e228250e4ab4a67a2fdbbdfb338c
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=907b9d70c229e228250e4ab4a67a2fdbbdfb338c

Author: Alexander Wirt <formorer at debian.org>
Date:   Sun Apr 22 09:23:39 2012 +0200

Don't use grep|grep -v grep

---

 tools/icinga_verification.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index d939b40..2c971f1 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -133,8 +133,8 @@ my $mysqlver =
 # Icinga Checks
 ################################
 
-# verify that idomod connected via socket to ido2db
-my $idocheck = `ps aux | grep ido2db | grep -v grep | wc -l`;
+#check if ido2db is running
+my $idocheck = qx( ps aux | grep [i]do2db | wc -l );
 chomp($idocheck);
 
 # ido2db.cfg parsing





More information about the icinga-checkins mailing list