mirror of
https://github.com/luzifer-docker/openldap.git
synced 2024-12-20 20:51:17 +00:00
Added functionality to reconfigure a previously configured container
This commit is contained in:
parent
8018760c5e
commit
88fbcb52dd
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||||
----------------
|
----------------
|
||||||
|
|
|
@ -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. "
|
||||||
|
|
Loading…
Reference in a new issue