From: Matt Palmer Date: Sun, 24 Jul 2016 23:25:17 +0000 (+1000) Subject: Escape slashes from smtp_password X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=63b6095f1b13669fec46f743e1a2a6086cade1f5;p=discourse_docker.git Escape slashes from smtp_password Makes sed a whole lot happier about life. --- diff --git a/discourse-setup b/discourse-setup index 67d84d4..94a90b5 100755 --- a/discourse-setup +++ b/discourse-setup @@ -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