Added functionality to reconfigure a previously configured container

This commit is contained in:
Christian Luginbühl 2015-12-20 15:59:32 +01:00
parent 8018760c5e
commit 88fbcb52dd
2 changed files with 9 additions and 2 deletions

View file

@ -83,7 +83,12 @@ a corresponsing name from the `module` directory. Currently only `memberof` is
avaliable. avaliable.
After the first start of the image (and the initial configuration), these 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 Data persistence
---------------- ----------------

View file

@ -9,7 +9,9 @@ set -e
chown -R openldap:openldap /var/lib/ldap/ /var/run/slapd/ 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 if [[ -z "$SLAPD_PASSWORD" ]]; then
echo -n >&2 "Error: Container not configured and SLAPD_PASSWORD not set. " echo -n >&2 "Error: Container not configured and SLAPD_PASSWORD not set. "