aboutsummaryrefslogtreecommitdiffstats
path: root/nagios-plugins
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2011-12-23 21:02:49 +0000
committerPetter Reinholdtsen <pere@hungry.com>2011-12-23 21:02:49 +0000
commit6c88aca85dc0b2600fdbf532626c4f20829455cc (patch)
tree311c220779deb3a4214384453df1e7c3cd818414 /nagios-plugins
parent9b970b18d30d5d60d87ecce1f81318af28899bd4 (diff)
downloadsitesummary-6c88aca85dc0b2600fdbf532626c4f20829455cc.tar.gz
sitesummary-6c88aca85dc0b2600fdbf532626c4f20829455cc.tar.bz2
sitesummary-6c88aca85dc0b2600fdbf532626c4f20829455cc.tar.xz
Report missing ldapsearch tool from check_ldap_root.
Diffstat (limited to 'nagios-plugins')
-rwxr-xr-xnagios-plugins/check_ldap_root7
1 files changed, 7 insertions, 0 deletions
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