diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/install | 3 | ||||
| -rw-r--r-- | scripts/upgrade | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/install b/scripts/install index 7e8e99d..d4056ef 100644 --- a/scripts/install +++ b/scripts/install @@ -162,6 +162,9 @@ config="$final_path/live/.env.production" language="$(echo $language | head -c 2)" +redis_namespace=${app}_production +ynh_app_setting_set --app="$app" --key=redis_namespace --value="$redis_namespace" + secret_key_base=$(ynh_string_random --length=128) ynh_app_setting_set --app="$app" --key=secret_key_base --value="$secret_key_base" diff --git a/scripts/upgrade b/scripts/upgrade index c5c46f0..0653f76 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) +redis_namespace=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$(ynh_sanitize_dbid --db_name=$app) db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) @@ -111,6 +112,12 @@ if [[ -z "$vapid_private_key" ]]; then ynh_app_setting_set "$app" vapid_public_key "$vapid_public_key" fi +# If redis_namespace doesn't exist, create it +if [[ -z "$redis_namespace" ]]; then + redis_namespace=${app}_production + ynh_app_setting_set --app=$app --key=redis_namespace --value=$redis_namespace +fi + #Remove previous added repository ynh_remove_extra_repo |
