mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-03 09:34:33 +02:00
Allow configuring SRS secrets using the environment (#885)
This commit is contained in:
parent
d691b8df6f
commit
2e8bb4ae34
3 changed files with 28 additions and 2 deletions
|
@ -1,12 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
# postsrsd-wrapper.sh, version 0.2.0
|
||||
# postsrsd-wrapper.sh, version 0.2.1
|
||||
|
||||
DOMAINNAME="$(hostname -d)"
|
||||
sed -i -e "s/localdomain/$DOMAINNAME/g" /etc/default/postsrsd
|
||||
|
||||
if [ -n "$SRS_SECRET" ]; then
|
||||
echo "$SRS_SECRET" | tr ',' '\n' > /etc/postsrsd.secret
|
||||
fi
|
||||
|
||||
if [ -n "$SRS_EXCLUDE_DOMAINS" ]; then
|
||||
sed -i -e "s/^#\?SRS_EXCLUDE_DOMAINS=.*$/SRS_EXCLUDE_DOMAINS=$SRS_EXCLUDE_DOMAINS/g" /etc/default/postsrsd
|
||||
fi
|
||||
|
||||
/etc/init.d/postsrsd start
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue