Skip to content

Commit

Permalink
Merge pull request #50 from IngmarPaetzold/master
Browse files Browse the repository at this point in the history
Fix for issues #42, #49
  • Loading branch information
rroemhild committed Sep 16, 2023
2 parents 080e00d + 90584b4 commit c530409
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 10 additions & 6 deletions rootfs/etc/cont-init.d/050-openldap-populate
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ load_initial_data() {
local data=$(find ${DATA_DIR} -maxdepth 1 -name \*_\*.ldif -type f | sort)
for ldif in ${data}; do
echo "Processing file ${ldif}..."
if [ ! -z "$LDAP_BASEDN" ]; then
echo "updating base dn dc=planetexpress,dc=com -> ${LDAP_BASEDN}"
sed -i "s/dc=planetexpress,dc=com/${LDAP_BASEDN}/g" "${ldif}"

base_dn=${LDAP_BASEDN:-}
if [ ! -z "${base_dn}" ]; then
echo "updating base dn dc=planetexpress,dc=com -> ${base_dn}"
sed -i "s/dc=planetexpress,dc=com/${base_dn}/g" "${ldif}"
fi
if [ "$LDAP_DOMAIN" != "planetexpress.com" ]; then
echo "updating emails @planetexpress.com -> @${LDAP_DOMAIN}"
sed -i "s/@planetexpress.com/@${LDAP_DOMAIN}/g" "${ldif}"

domain=${LDAP_DOMAIN:-}
if [ "${domain}" != "planetexpress.com" ]; then
echo "updating emails @planetexpress.com -> @${domain}"
sed -i "s/@planetexpress.com/@${domain}/g" "${ldif}"
fi

ldapadd -x -H ldapi:/// \
Expand Down
3 changes: 0 additions & 3 deletions rootfs/opt/openldap/bootstrap/config/tls.ldif
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
dn: cn=config
changetype: modify
replace: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ldap/ssl/fullchain.crt
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/ldap/ssl/ldap.crt
-
Expand Down

0 comments on commit c530409

Please sign in to comment.