File tree Expand file tree Collapse file tree 8 files changed +13
-7
lines changed
Expand file tree Collapse file tree 8 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ This helps to keep your container configuration secret. If you don't care all en
233233Required and used for new ldap server only:
234234- ** LDAP_ORGANISATION** : Organisation name. Defaults to ` Example Inc. `
235235- ** LDAP_DOMAIN** : Ldap domain. Defaults to ` example.org `
236+ - ** LDAP_BASE_DN** : Ldap base DN. If empty automatically set from LDAP_DOMAIN value. Defaults to ` (empty) `
236237- ** LDAP_ADMIN_PASSWORD** Ldap Admin password. Defaults to ` admin `
237238- ** LDAP_CONFIG_PASSWORD** Ldap Config password. Defaults to ` config `
238239
Original file line number Diff line number Diff line change 99# Required and used for new ldap server only
1010LDAP_ORGANISATION: Example Inc.
1111LDAP_DOMAIN: example.org
12+ LDAP_BASE_DN: #if empty automatically set from LDAP_DOMAIN
13+
1214LDAP_ADMIN_PASSWORD: admin
1315LDAP_CONFIG_PASSWORD: config
1416
Original file line number Diff line number Diff line change @@ -29,14 +29,17 @@ if [ ! -e "$FIRST_START_DONE" ]; then
2929 # Helpers
3030 #
3131 function get_ldap_base_dn() {
32- LDAP_BASE_DN=" "
33- IFS=' .' read -ra LDAP_BASE_DN_TABLE <<< " $LDAP_DOMAIN"
34- for i in " ${LDAP_BASE_DN_TABLE[@]} " ; do
35- EXT=" dc=$i ,"
36- LDAP_BASE_DN=$LDAP_BASE_DN$EXT
37- done
32+ # if LDAP_BASE_DN is empty set value from LDAP_DOMAIN
33+ if [ -z " $LDAP_BASE_DN " ]; then
34+ IFS=' .' read -ra LDAP_BASE_DN_TABLE <<< " $LDAP_DOMAIN"
35+ for i in " ${LDAP_BASE_DN_TABLE[@]} " ; do
36+ EXT=" dc=$i ,"
37+ LDAP_BASE_DN=$LDAP_BASE_DN$EXT
38+ done
39+
40+ LDAP_BASE_DN=${LDAP_BASE_DN::- 1}
41+ fi
3842
39- LDAP_BASE_DN=${LDAP_BASE_DN::- 1}
4043 }
4144
4245 function is_new_schema() {
You canβt perform that action at this time.
0 commit comments