From 610cca6f3afcb1cfcf10cd1587cd2fd367dcb445 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Thu, 10 May 2018 14:45:13 +0200 Subject: [PATCH] fix key and unaccent extension --- conf/env.prod | 2 +- scripts/install | 4 +++- scripts/remove | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conf/env.prod b/conf/env.prod index d2fc614..acd3fd7 100644 --- a/conf/env.prod +++ b/conf/env.prod @@ -70,7 +70,7 @@ DJANGO_ALLOWED_HOSTS=__DOMAIN__ DJANGO_SETTINGS_MODULE=config.settings.production # Generate one using `openssl rand -base64 45`, for example -DJANGO_SECRET_KEY="__KEY__" +DJANGO_SECRET_KEY=__KEY__ # You don't have to edit this, but you can put the admin on another URL if you # want to diff --git a/scripts/install b/scripts/install index b4d176f..86433a3 100644 --- a/scripts/install +++ b/scripts/install @@ -79,6 +79,8 @@ ynh_psql_create_db "$db_name" "$app" "$db_user_pwd" ynh_app_setting_set "$app" db_name "$db_name" ynh_app_setting_set "$app" psqlpwd "$db_user_pwd" +ynh_psql_execute_as_root "CREATE EXTENSION IF NOT EXISTS unaccent;" + systemctl reload postgresql #================================================= @@ -145,7 +147,7 @@ configfile="$final_path/config/.env" cp ../conf/env.prod "$configfile" -key=$(ynh_string_random 50) +key=$(ynh_string_random) ynh_app_setting_set "$app" key "$key" diff --git a/scripts/remove b/scripts/remove index 6149ad0..82f89c3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,7 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_die "!" #================================================= # LOAD SETTINGS #================================================= @@ -45,6 +44,7 @@ ynh_remove_app_dependencies # Remove a database if it exists, along with the associated user ynh_psql_remove_db "$db_name" "$app" +ynh_psql_execute_as_root "DROP EXTENSION IF EXISTS unaccent;" #================================================= # REMOVE DEPENDENCIES