From 02a8d37a9e61c72e367602fea5f4ae653156eba1 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 12 Apr 2017 10:23:48 +0200 Subject: [PATCH] Change secret generation --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 1757147..7e8e79c 100644 --- a/scripts/install +++ b/scripts/install @@ -150,9 +150,9 @@ sudo sed -i "s@DB_NAME=postgres@DB_NAME=${app}_production@g" "${final_path}/live # sudo sed -i "s@DB_PASS=@DB_PASS=${dbpass}@g" "${final_path}/live/.env.production" sudo sed -i "s@LOCAL_DOMAIN=example.com@LOCAL_DOMAIN=${domain}@g" "${final_path}/live/.env.production" -sudo sed -i "s@PAPERCLIP_SECRET=@PAPERCLIP_SECRET=$(head -n32 /dev/urandom | tr -dc -d 'A-Za-z0-9' | head -c32)@g" "${final_path}/live/.env.production" -sudo sed -i "s@SECRET_KEY_BASE=@SECRET_KEY_BASE=$(head -n32 /dev/urandom | tr -dc -d 'A-Za-z0-9' | head -c32)@g" "${final_path}/live/.env.production" -sudo sed -i "s@OTP_SECRET=@OTP_SECRET=$(head -n32 /dev/urandom | tr -dc -d 'A-Za-z0-9' | head -c32)@g" "${final_path}/live/.env.production" +sudo sed -i "s@PAPERCLIP_SECRET=@PAPERCLIP_SECRET=$(rake secret)@g" "${final_path}/live/.env.production" +sudo sed -i "s@SECRET_KEY_BASE=@SECRET_KEY_BASE=$(rake secret)@g" "${final_path}/live/.env.production" +sudo sed -i "s@OTP_SECRET=@OTP_SECRET=$(rake secret)@g" "${final_path}/live/.env.production" sudo sed -i "s@SMTP_SERVER=smtp.mailgun.org@SMTP_SERVER=localhost@g" "${final_path}/live/.env.production" sudo sed -i 's,SMTP_FROM_ADDRESS=notifications@example.com,SMTP_FROM_ADDRESS='${admin_mastodon}'@'${domain}',' "${final_path}/live/.env.production"