From 6c88aca85dc0b2600fdbf532626c4f20829455cc Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Fri, 23 Dec 2011 21:02:49 +0000 Subject: Report missing ldapsearch tool from check_ldap_root. --- nagios-plugins/check_ldap_root | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nagios-plugins/check_ldap_root') diff --git a/nagios-plugins/check_ldap_root b/nagios-plugins/check_ldap_root index a4ce47f..64c78f8 100755 --- a/nagios-plugins/check_ldap_root +++ b/nagios-plugins/check_ldap_root @@ -15,6 +15,13 @@ fi ldapserver=$1 shift +if type ldapsearch > /dev/null 2>&1 ; then + : +else + echo "Missing the ldapsearch tool, unable to check LDAP server." + exit 2 +fi + if ldapsearch -l 3 -LLL -h $ldapserver -x -b '' -s base > /dev/null 2>&1 ; then echo "OK - Searching for LDAP root DSE worked on $ldapserver" exit 0 -- cgit v1.2.3