Closed nix-power closed 1 year ago
Actually i have fixed this by changing code of startup.sh script and using new environment variable
# Error: the database directory (/var/lib/ldap) is empty but not the config directory (/etc/ldap/slapd.d)
#
elif [ -z "$(ls -A -I lost+found --ignore=.* /var/lib/ldap)" ] && [ ! -z "$(ls -A -I lost+found --ignore=.* /etc/ldap/slapd.d)" ]; then
- log-helper error "Error: the database directory (/var/lib/ldap) is empty but not the config directory (/etc/ldap/slapd.d)"
- exit 1
+ if [ -z ${SLAVE_MOOE} ]; then
+ log-helper error "Error: the database directory (/var/lib/ldap) is empty but not the config directory (/etc/ldap/slapd.d)"
+ exit 1
+ fi
Aftter rebuilding the image and ruinning it with --env SLAVE_MODE=true replication works fine and pulls all db files from master on startup. This could be closed.
I want to start container (as a slave) with existent configuration, and ldap db it should pull from the master. I am starting the container as followiing
However, if the /srv/ldap/db is empty i get the following error
How can i make this working ?