File: wait_for_ldap

package info (click to toggle)
ldaptive 2.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,192 kB
  • sloc: java: 68,618; xml: 3,223; sh: 338; makefile: 2
file content (9 lines) | stat: -rwxr-xr-x 330 bytes parent folder | download
1
2
3
4
5
6
7
8
9
#!/bin/bash

export LDAPTLS_REQCERT=never
export LDAP_CONNECT="-H ldap://ldap-test -x -D ${BIND_DN} -w ${BIND_CREDENTIAL}"
LDAP_RETRIES=30
until [[ `ldapcompare ${LDAP_CONNECT} uid=1,ou=test,dc=vt,dc=edu uid:1` == "TRUE" ]] || [ "$LDAP_RETRIES" -eq 0 ]; do
  echo "Waiting for openldap server: $((LDAP_RETRIES--))"
  sleep 1
done