Skip to content

Commit

Permalink
ignore empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbauer committed May 2, 2024
1 parent 67ed3bf commit dbf9ccf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ 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",
"DISCOURSE_API_USERNAME": "$api_username",
"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}
Expand Down

0 comments on commit dbf9ccf

Please sign in to comment.