Fixed ldap condition in makefile

This commit is contained in:
Thomas VIAL 2016-12-27 22:48:00 +01:00
parent 1de97123d9
commit 2b6eb75edd
No known key found for this signature in database
GPG Key ID: 0394CEE552FAFEFC
1 changed files with 8 additions and 7 deletions

View File

@ -17,12 +17,13 @@ generate-accounts:
docker run --rm -e MAIL_USER=user2@otherdomain.tld -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s SHA512-CRYPT -u $$MAIL_USER -p $$MAIL_PASS)"' >> test/config/postfix-accounts.cf docker run --rm -e MAIL_USER=user2@otherdomain.tld -e MAIL_PASS=mypassword -t $(NAME) /bin/sh -c 'echo "$$MAIL_USER|$$(doveadm pw -s SHA512-CRYPT -u $$MAIL_USER -p $$MAIL_PASS)"' >> test/config/postfix-accounts.cf
run: run:
@if [ -z $(ENABLE_LDAP) ]; then\ ifeq ($(ENABLE_LDAP),1)
docker run -d --name ldap_for_mail \ docker run -d --name ldap_for_mail \
-e LDAP_DOMAIN="localhost.localdomain" \ -e LDAP_DOMAIN="localhost.localdomain" \
-h mail.my-domain.com -t ldap; -h mail.my-domain.com -t ldap ;
fi endif
# Run containers
Run containers
docker run -d --name mail \ docker run -d --name mail \
-v "`pwd`/test/config":/tmp/docker-mailserver \ -v "`pwd`/test/config":/tmp/docker-mailserver \
-v "`pwd`/test":/tmp/docker-mailserver-test \ -v "`pwd`/test":/tmp/docker-mailserver-test \
@ -35,7 +36,7 @@ run:
-e ENABLE_FETCHMAIL=$(ENABLE_FETCHMAIL) \ -e ENABLE_FETCHMAIL=$(ENABLE_FETCHMAIL) \
-e ONE_DIR=$(ONE_DIR) \ -e ONE_DIR=$(ONE_DIR) \
-e PERMIT_DOCKER=$(PERMIT_DOCKER) \ -e PERMIT_DOCKER=$(PERMIT_DOCKER) \
-e ENABLE_LDAP=$(ENABLE_LDAP) \ -e ENABLE_LDAP=$(ENABLE_LDAP) \
-e LDAP_SERVER_HOST=$(LDAP_SERVER_HOST) \ -e LDAP_SERVER_HOST=$(LDAP_SERVER_HOST) \
-e LDAP_SEARCH_BASE=$(LDAP_SEARCH_BASE) \ -e LDAP_SEARCH_BASE=$(LDAP_SEARCH_BASE) \
-e LDAP_BIND_DN=$(LDAP_BIND_DN) \ -e LDAP_BIND_DN=$(LDAP_BIND_DN) \