diff options
| author | magikcypress <cyp@rouquin.me> | 2017-04-19 02:37:40 +0200 |
|---|---|---|
| committer | magikcypress <cyp@rouquin.me> | 2017-04-19 02:37:40 +0200 |
| commit | 82fa072ce64ccf0307a650a66c5d578fb749d40f (patch) | |
| tree | 199279340ca38a02a2f501f080beed2617074225 /scripts/install | |
| parent | 128aa107baf2bbf713a6af43182e1bc6d9c7a1a7 (diff) | |
| download | mastodon_ynh-82fa072ce64ccf0307a650a66c5d578fb749d40f.tar.gz mastodon_ynh-82fa072ce64ccf0307a650a66c5d578fb749d40f.tar.bz2 mastodon_ynh-82fa072ce64ccf0307a650a66c5d578fb749d40f.zip | |
[fix] Secret key install + backup correct + restore (need test restore)
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/install b/scripts/install index d99ffe2..cf4b720 100644 --- a/scripts/install +++ b/scripts/install @@ -135,9 +135,12 @@ sudo sed -i "s@LOCAL_DOMAIN=example.com@LOCAL_DOMAIN=${domain}@g" "${final_path} language="$(echo $language | head -c 2)" sudo sed -i "s@# DEFAULT_LOCALE=de@DEFAULT_LOCALE=${language}@g" "${final_path}/live/.env.production" -sudo sed -i "s@PAPERCLIP_SECRET=@PAPERCLIP_SECRET=$(head -n128 /dev/urandom | tr -dc -d 'a-z0-9' | head -c128)@g" "${final_path}/live/.env.production" -sudo sed -i "s@SECRET_KEY_BASE=@SECRET_KEY_BASE=$(head -n128 /dev/urandom | tr -dc -d 'a-z0-9' | head -c128)@g" "${final_path}/live/.env.production" -sudo sed -i "s@OTP_SECRET=@OTP_SECRET=$(head -n128 /dev/urandom | tr -dc -d 'a-z0-9' | head -c128)@g" "${final_path}/live/.env.production" +paperclip_secret=$(head -n128 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c128) +secret_key_base=$(head -n128 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c128) +otp_secret=$(head -n128 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c128) +sudo sed -i "s@PAPERCLIP_SECRET=@PAPERCLIP_SECRET=${paperclip_secret}@g" "${final_path}/live/.env.production" +sudo sed -i "s@SECRET_KEY_BASE=@SECRET_KEY_BASE=${secret_key_base}@g" "${final_path}/live/.env.production" +sudo sed -i "s@OTP_SECRET=@OTP_SECRET=${otp_secret}@g" "${final_path}/live/.env.production" sudo sed -i 's,SMTP_LOGIN=,SMTP_LOGIN='${admin_mastodon}'@'${domain}',' "${final_path}/live/.env.production" sudo sed -i "s@SMTP_PASSWORD=@SMTP_PASSWORD=${admin_pass}@g" "${final_path}/live/.env.production" |
