ninedocker/services/30-openldap/volume/nine/init.sh

19 lines
595 B
Bash
Raw Normal View History

2024-07-04 12:42:13 +02:00
#!/bin/bash
if [[ ! -f /bitnami/openldap/.isinit ]]
then
echo ""
echo "Initialisation annuaire"
echo ""
# Suppression de l'entrée users généré automatiquement par l'image docker bitnami/openldap
ldapdelete ou=users,${LDAP_BASEDN} -r -H ldap://${LDAP_HOST}:${LDAP_PORT} -D ${LDAP_USER} -w ${LDAP_PASSWORD} 2>/dev/null
# Integration du ldif de base
2024-10-21 21:45:27 +02:00
ldapadd -H ldap://${LDAP_HOST}:${LDAP_PORT} -D ${LDAP_USER} -w ${LDAP_PASSWORD} -f '/nine/ldif/nine.ldif' 2>/dev/null
2024-07-04 12:42:13 +02:00
/nine/changepassword.sh admin ${ADMIN_PASSWORD}
touch /bitnami/openldap/.isinit
fi