1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00

Adds new env variables required by mastodon

This commit is contained in:
Tagada 2024-07-05 21:10:09 +02:00
parent 18161d53bc
commit 51f2e91377
3 changed files with 23 additions and 0 deletions

View file

@ -80,6 +80,9 @@ OTP_SECRET=__OTP_SECRET__
VAPID_PRIVATE_KEY=__VAPID_PRIVATE_KEY__
VAPID_PUBLIC_KEY=__VAPID_PUBLIC_KEY__
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=__ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY__
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=__ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY__
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=__ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT__
# Registrations
# -------------

View file

@ -50,6 +50,15 @@ ynh_app_setting_set --app="$app" --key=secret_key_base --value="$secret_key_base
otp_secret=$(ynh_string_random --length=128)
ynh_app_setting_set --app="$app" --key=otp_secret --value="$otp_secret"
active_record_encryption_primary_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=active_record_encryption_primary_key --value="$active_record_encryption_primary_key"
active_record_encryption_deterministic_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=active_record_encryption_deterministic_key --value="$active_record_encryption_deterministic_key"
active_record_encryption_key_derivation_salt=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=active_record_encryption_key_derivation_salt --value="$active_record_encryption_key_derivation_salt"
#=================================================
# INSTALL DEPENDENCIES
#=================================================

View file

@ -24,6 +24,17 @@ fi
#Remove previous added repository
ynh_remove_extra_repo
if ynh_compare_current_package_version --comparison lt --version 2024.05.01~ynh1; then
active_record_encryption_primary_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=active_record_encryption_primary_key --value="$active_record_encryption_primary_key"
active_record_encryption_deterministic_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=active_record_encryption_deterministic_key --value="$active_record_encryption_deterministic_key"
active_record_encryption_key_derivation_salt=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key=active_record_encryption_key_derivation_salt --value="$active_record_encryption_key_derivation_salt"
fi
#=================================================
# STOP SYSTEMD SERVICE
#=================================================