mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-07 15:04:56 +08:00
Fix #104: Inproper usage of sed
A small error where sed was called wrongly ('s/.../d') instead of '/.../d' was causing an error `sed: unmatched '/' on configuration change`. This commit should fix the issue.
This commit is contained in:
parent
fd5c00c1bc
commit
156b45d9f7
1 changed files with 1 additions and 1 deletions
|
@ -200,7 +200,7 @@ postfix_setup_relayhost() {
|
|||
echo -e " using username ${emphasis}$RELAYHOST_USERNAME${reset} and password ${emphasis}(redacted)${reset}."
|
||||
if [[ -f /etc/postfix/sasl_passwd ]]; then
|
||||
if ! grep -F "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" /etc/postfix/sasl_passwd; then
|
||||
sed -i -e "s/^$SASL_RELAYHOST .*$/d" /etc/postfix/sasl_passwd
|
||||
sed -i -e "/^$SASL_RELAYHOST .*$/d" /etc/postfix/sasl_passwd
|
||||
echo "$SASL_RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" >> /etc/postfix/sasl_passwd
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue