From dbf9ccf13c89609dba1830771d074cbc3f733bba Mon Sep 17 00:00:00 2001 From: Martin Ortbauer Date: Fri, 3 May 2024 00:55:47 +0200 Subject: [PATCH] ignore empty lines --- start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start.sh b/start.sh index 5980e14..800c38f 100755 --- a/start.sh +++ b/start.sh @@ -4,6 +4,8 @@ cp /etc/postfix/originals/* /etc/postfix/ discourse_id=0 while read base_url api_username api_key; do + if [ ! -z "$base_url" ] + then cat << EOF > /etc/postfix/discourse_instance_$discourse_id.json { "DISCOURSE_BASE_URL": "https://$base_url", @@ -11,6 +13,7 @@ while read base_url api_username api_key; do "DISCOURSE_API_KEY": "$api_key" } EOF + fi cat << EOF >> /etc/postfix/master.cf discourse_$discourse_id unix - n n - - pipe user=nobody:nogroup argv=/usr/local/bin/discourse-receive-mail /etc/postfix/discourse_instance_$discourse_id.json \${recipient}