diff options
| author | magikcypress <cyp@rouquin.me> | 2017-04-15 04:20:28 +0200 |
|---|---|---|
| committer | magikcypress <cyp@rouquin.me> | 2017-04-15 04:20:28 +0200 |
| commit | 9bddc797b46855a64e0a4e943dd3480f84b8b5a4 (patch) | |
| tree | a61d4bb529ce5421ee3c614973d277cc67383183 /scripts/install | |
| parent | 4ff6c990ccdf7a1085a8b91c09e3dfe36c02967d (diff) | |
| download | mastodon_ynh-9bddc797b46855a64e0a4e943dd3480f84b8b5a4.tar.gz mastodon_ynh-9bddc797b46855a64e0a4e943dd3480f84b8b5a4.tar.bz2 mastodon_ynh-9bddc797b46855a64e0a4e943dd3480f84b8b5a4.zip | |
[add] language
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/install b/scripts/install index 75c2cfd..2e68844 100644 --- a/scripts/install +++ b/scripts/install @@ -17,6 +17,7 @@ domain=$YNH_APP_ARG_DOMAIN path=$YNH_APP_ARG_PATH admin_mastodon=$YNH_APP_ARG_ADMIN admin_pass=$YNH_APP_ARG_PASSWD +language=$YNH_APP_ARG_LANGUAGE is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME @@ -35,6 +36,7 @@ ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path ynh_app_setting_set $app admin $admin_mastodon ynh_app_setting_set $app pass $admin_pass +ynh_app_setting_set $app language $language ynh_app_setting_set $app is_public $is_public # Create user unix @@ -136,6 +138,9 @@ sudo sed -i "s@DB_USER=postgres@DB_USER=${app}@g" "${final_path}/live/.env.produ sudo sed -i "s@DB_NAME=postgres@DB_NAME=${app}_production@g" "${final_path}/live/.env.production" sudo sed -i "s@LOCAL_DOMAIN=example.com@LOCAL_DOMAIN=${domain}@g" "${final_path}/live/.env.production" +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" |
