mirror of
https://github.com/bitnami/containers.git
synced 2026-03-06 06:58:01 +08:00
split generation/addition of schemas and importing of LDIF files from generation of default LDAP tree when LDAP_SKIP_DEFAULT_TREE is set to yes
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
This commit is contained in:
@@ -464,19 +464,17 @@ ldap_initialize() {
|
||||
if is_boolean_yes "$LDAP_ENABLE_TLS"; then
|
||||
ldap_configure_tls
|
||||
fi
|
||||
if is_boolean_yes "$LDAP_SKIP_DEFAULT_TREE"; then
|
||||
info "Skipping default schemas/tree structure"
|
||||
# Initialize OpenLDAP with schemas/tree structure
|
||||
ldap_add_schemas
|
||||
if [[ -f "$LDAP_CUSTOM_SCHEMA_FILE" ]]; then
|
||||
ldap_add_custom_schema
|
||||
fi
|
||||
if ! is_dir_empty "$LDAP_CUSTOM_LDIF_DIR"; then
|
||||
ldap_add_custom_ldifs
|
||||
elif is_boolean_no "$LDAP_SKIP_DEFAULT_TREE"; then
|
||||
ldap_create_tree
|
||||
else
|
||||
# Initialize OpenLDAP with schemas/tree structure
|
||||
ldap_add_schemas
|
||||
if [[ -f "$LDAP_CUSTOM_SCHEMA_FILE" ]]; then
|
||||
ldap_add_custom_schema
|
||||
fi
|
||||
if ! is_dir_empty "$LDAP_CUSTOM_LDIF_DIR"; then
|
||||
ldap_add_custom_ldifs
|
||||
else
|
||||
ldap_create_tree
|
||||
fi
|
||||
info "Skipping default schemas/tree structure"
|
||||
fi
|
||||
ldap_stop
|
||||
fi
|
||||
|
||||
@@ -464,19 +464,17 @@ ldap_initialize() {
|
||||
if is_boolean_yes "$LDAP_ENABLE_TLS"; then
|
||||
ldap_configure_tls
|
||||
fi
|
||||
if is_boolean_yes "$LDAP_SKIP_DEFAULT_TREE"; then
|
||||
info "Skipping default schemas/tree structure"
|
||||
# Initialize OpenLDAP with schemas/tree structure
|
||||
ldap_add_schemas
|
||||
if [[ -f "$LDAP_CUSTOM_SCHEMA_FILE" ]]; then
|
||||
ldap_add_custom_schema
|
||||
fi
|
||||
if ! is_dir_empty "$LDAP_CUSTOM_LDIF_DIR"; then
|
||||
ldap_add_custom_ldifs
|
||||
elif is_boolean_no "$LDAP_SKIP_DEFAULT_TREE"; then
|
||||
ldap_create_tree
|
||||
else
|
||||
# Initialize OpenLDAP with schemas/tree structure
|
||||
ldap_add_schemas
|
||||
if [[ -f "$LDAP_CUSTOM_SCHEMA_FILE" ]]; then
|
||||
ldap_add_custom_schema
|
||||
fi
|
||||
if ! is_dir_empty "$LDAP_CUSTOM_LDIF_DIR"; then
|
||||
ldap_add_custom_ldifs
|
||||
else
|
||||
ldap_create_tree
|
||||
fi
|
||||
info "Skipping default schemas/tree structure"
|
||||
fi
|
||||
ldap_stop
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user