From 63b6095f1b13669fec46f743e1a2a6086cade1f5 Mon Sep 17 00:00:00 2001 From: Matt Palmer Date: Mon, 25 Jul 2016 09:25:17 +1000 Subject: [PATCH] Escape slashes from smtp_password Makes sed a whole lot happier about life. --- discourse-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.25.1