Browse Source

add the ability to seed ldap domain

fixes https://github.com/zokradonh/kopano-docker/issues/45

Signed-off-by: Felix Bartels <[email protected]>
Felix Bartels 7 years ago
parent
commit
9d7b166a52
2 changed files with 2 additions and 0 deletions
  1. 1 0
      README.md
  2. 1 0
      image/service/slapd/startup.sh

+ 1 - 0
README.md

@@ -133,6 +133,7 @@ The startup script provides some substitutions in bootstrap ldif files. Followin
 
 - `{{ LDAP_BASE_DN }}`
 - `{{ LDAP_BACKEND }}`
+- `{{ LDAP_DOMAIN }}`
 - `{{ LDAP_READONLY_USER_USERNAME }}`
 - `{{ LDAP_READONLY_USER_PASSWORD_ENCRYPTED }}`
 

+ 1 - 0
image/service/slapd/startup.sh

@@ -67,6 +67,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then
     log-helper debug "Processing file ${LDIF_FILE}"
     sed -i "s|{{ LDAP_BASE_DN }}|${LDAP_BASE_DN}|g" $LDIF_FILE
     sed -i "s|{{ LDAP_BACKEND }}|${LDAP_BACKEND}|g" $LDIF_FILE
+    sed -i "s|{{ LDAP_DOMAIN }}|${LDAP_DOMAIN}|g" $LDIF_FILE
     if [ "${LDAP_READONLY_USER,,}" == "true" ]; then
       sed -i "s|{{ LDAP_READONLY_USER_USERNAME }}|${LDAP_READONLY_USER_USERNAME}|g" $LDIF_FILE
       sed -i "s|{{ LDAP_READONLY_USER_PASSWORD_ENCRYPTED }}|${LDAP_READONLY_USER_PASSWORD_ENCRYPTED}|g" $LDIF_FILE