diff --git a/README.md b/README.md index cc60067..bd27167 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,12 @@ a corresponsing name from the `module` directory. Currently only `memberof` is avaliable. After the first start of the image (and the initial configuration), these -envirnonment variables are not evaluated anymore. +envirnonment variables are not evaluated anymore. If one needs to reconfigure +the `slapd` service, it is possible to set + + SLAPD_FORCE_RECONFIGURE (defaults to false) + +to `true`. Data persistence ---------------- diff --git a/entrypoint.sh b/entrypoint.sh index 8454db8..3223edd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,7 +9,9 @@ set -e chown -R openldap:openldap /var/lib/ldap/ /var/run/slapd/ -if [[ ! -d /etc/ldap/slapd.d ]]; then +SLAPD_FORCE_RECONFIGURE="${SLAPD_FORCE_RECONFIGURE:-false}" + +if [[ ! -d /etc/ldap/slapd.d || "$SLAPD_FORCE_RECONFIGURE" == "true" ]]; then if [[ -z "$SLAPD_PASSWORD" ]]; then echo -n >&2 "Error: Container not configured and SLAPD_PASSWORD not set. "