Escape slashes from smtp_password

Makes sed a whole lot happier about life.
This commit is contained in:
Matt Palmer 2016-07-25 09:25:17 +10:00
parent 4d7edb234e
commit 63b6095f1b
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ ask_user_for_config() {
update_ok="n"
fi
sed -i -e "s/^ #DISCOURSE_SMTP_PASSWORD:.*/ DISCOURSE_SMTP_PASSWORD: \"$smtp_password\"/w $changelog" $config_file
sed -i -e "s/^ #DISCOURSE_SMTP_PASSWORD:.*/ DISCOURSE_SMTP_PASSWORD: \"${smtp_password/\//\\/}\"/w $changelog" $config_file
if [ -s $changelog ]
then
rm $changelog