From 79adb78ebfabf9cda0c2ce105606f56481990dbe Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Wed, 20 Oct 2021 13:04:13 +0200 Subject: [PATCH] remove duplicate line --- docker/cloud/startup | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/cloud/startup b/docker/cloud/startup index 17d825c4..0a866ffe 100755 --- a/docker/cloud/startup +++ b/docker/cloud/startup @@ -2,14 +2,11 @@ set -e # Setup postfix if not done yet -if [ -f "/etc/postfix/sasl_passwd" ] && [ ! -f "/etc/postfix/sasl_passwd.db" ]; then +if [ -f "/mailgun.txt" ] && [ ! -f "/etc/postfix/setupok" ]; then echo "Configuring postfix..." - postmap /etc/postfix/sasl_passwd - chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db - echo "relayhost = smtp.mailgun.org" >> /etc/postfix/main.cf - echo "smtp_sasl_auth_enable = yes" >> /etc/postfix/main.cf - echo "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" >> /etc/postfix/main.cf - echo "smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf + touch "/etc/postfix/setupok" + sed -i '/^relayhost/d' /etc/postfix/main.cf + cat /mailgun.txt >> /etc/postfix/main.cf fi # Start background services