mirror of
https://github.com/osixia/container-openldap.git
synced 2026-09-28 01:56:04 -04:00
Substitutes Base DN in custom ldif files
This commit is contained in:
@@ -192,6 +192,7 @@ EOF
|
||||
log-helper info "Add bootstrap ldif..."
|
||||
for f in $(find ${CONTAINER_SERVICE_DIR}/slapd/assets/config/bootstrap/ldif -mindepth 1 -maxdepth 1 -type f -name \*.ldif | sort); do
|
||||
log-helper debug "Processing file ${f}"
|
||||
sed -i "s|{{ LDAP_BASE_DN }}|${LDAP_BASE_DN}|g" $f
|
||||
ldapmodify -Y EXTERNAL -Q -H ldapi:/// -f $f 2>&1 | log-helper debug || ldapmodify -h localhost -p 389 -D cn=admin,$LDAP_BASE_DN -w $LDAP_ADMIN_PASSWORD -f $f 2>&1 | log-helper debug
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user