Added LDAP configuration validation

LDAP config validation has been partially added, validating using an
ldapsearch if the LDAP server can be contacted. If not, script will
restart.