Skip to content

Commit

Permalink
Changed check method for DB_CONFIG file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
joariasl committed Feb 27, 2019
1 parent a175482 commit 13d9046
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ sed -i -E 's|^(ldap_servers:[[:blank:]]*).*|\1'"$LDAP_SERVERS"'|' /etc/saslauthd
&& sed -i -E 's/^(ldap_password:[[:blank:]]*).*/\1'"$LDAP_PASSWORD"'/' /etc/saslauthd.conf

# If initial configuration and database does not exists in volumes
slaptest -f /usr/local/var/openldap-data/DB_CONFIG
if [ $? != 0 ]
if [ ! -f /usr/local/var/openldap-data/DB_CONFIG ]
then
echo "Creating initial database..."
cp /opt/openldap-init/DB_CONFIG.example /usr/local/var/openldap-data/DB_CONFIG
Expand Down

0 comments on commit 13d9046

Please sign in to comment.