Commits

Zhang Huangbin committed 07eac0c

Sleep 5 seconds for ldapd(8) initialization.

  • Participants
  • Parent commits ae20de9

Comments (0)

Files changed (1)

File iRedMail/functions/ldapd.sh

     ECHO_DEBUG "Start ldapd"
     ${DIR_RC_SCRIPTS}/${LDAPD_RC_SCRIPT_NAME} restart &>/dev/null
 
+    ECHO_DEBUG "Sleep 5 seconds for LDAP daemon initialize ..."
+    sleep 5
+
     ECHO_DEBUG "Populate LDAP tree"
-    ldapadd -x -D "${LDAP_ROOTDN}" -w "${LDAP_ROOTPW}" -f ${LDAP_INIT_LDIF} >/dev/null
+    ldapadd -x \
+        -h ${LDAP_SERVER_HOST} -p ${LDAP_SERVER_PORT} \
+        -D "${LDAP_ROOTDN}" -w "${LDAP_ROOTPW}" \
+        -f ${LDAP_INIT_LDIF}
 
     echo 'export status_ldapd_config="DONE"' >> ${STATUS_FILE}
 }