FIX: discourse-setup was not adding MAXMIND key
authorJay Pfaffman <pfaffman@gmail.com>
Wed, 27 Jan 2021 01:16:48 +0000 (17:16 -0800)
committerRafael dos Santos Silva <xfalcox@gmail.com>
Thu, 4 Feb 2021 18:53:47 +0000 (15:53 -0300)
Oops. The line that was supposed to add the MAXMIND line to app.yml was broken.

discourse-setup

index 223ed88bdaa90c906a4b023e576646dbc055876b..d0e4bc540543bdf89b15a332b478f70e53fc287d 100755 (executable)
@@ -317,11 +317,10 @@ read_default() {
 }
 
 assert_maxmind_license_key() {
-  echo "Checking if $web_file has MAXMIND placeholder."
   if  ! grep DISCOURSE_MAXMIND_LICENSE_KEY $web_file
   then
     echo "Adding MAXMIND placeholder to $web_file"
-    sed -i -e 's/LETSENCRYPT_ACCOUNT_EMAIL/a\ \ #DISCOURSE_MAXMIND_LICENSE_KEY: 1234567890123456' $web_file
+    sed -i '/^.*LETSENCRYPT_ACCOUNT_EMAIL.*/a \ \ #DISCOURSE_MAXMIND_LICENSE_KEY: 1234567890123456' containers/app.yml
   fi
 }