Skip to content

Commit 13d9046

Browse files
committed
Changed check method for DB_CONFIG file existence
1 parent a175482 commit 13d9046

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ sed -i -E 's|^(ldap_servers:[[:blank:]]*).*|\1'"$LDAP_SERVERS"'|' /etc/saslauthd
2828
&& sed -i -E 's/^(ldap_password:[[:blank:]]*).*/\1'"$LDAP_PASSWORD"'/' /etc/saslauthd.conf
2929

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

0 commit comments

Comments
 (0)