From d79d1a2c24c68a4e171206e4d1a55d146485a98f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 10 Apr 2019 02:25:33 +0200 Subject: [PATCH 1/3] spacing --- scripts/upgrade | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ba7bb706..8eef5ffa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,8 +156,6 @@ pushd "$final_path" php7.2 artisan horizon:purge popd - - ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/.env" From 96d964838ce4c758ba3472673db575ceb525da75 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 10 Apr 2019 02:25:54 +0200 Subject: [PATCH 2/3] activate APP_KEY --- conf/.env | 2 +- scripts/install | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index ccd91fe0..378734cb 100644 --- a/conf/.env +++ b/conf/.env @@ -1,6 +1,6 @@ APP_NAME=__APP__ APP_ENV=production -APP_KEY= +APP_KEY=__APP_KEY__ APP_DEBUG=true APP_URL=https://__DOMAIN__ diff --git a/scripts/install b/scripts/install index 4c263969..63381d08 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC +app_key=$(ynh_string_random --length=32) app=$YNH_APP_INSTANCE_NAME @@ -44,6 +45,7 @@ ynh_webpath_register "$app" "$domain" "$path_url" ynh_app_setting_set "$app" domain "$domain" ynh_app_setting_set "$app" path "$path_url" ynh_app_setting_set "$app" is_public "$is_public" +ynh_app_setting_set "$app" app_key "$app_key" #================================================= # STANDARD MODIFICATIONS @@ -129,6 +131,7 @@ config="$final_path/.env" cp ../conf/.env "$config" ynh_replace_string "__APP__" "$app" "$config" +ynh_replace_string "__APP_KEY__" "$app_key" "$config" ynh_replace_string "__DOMAIN__" "$domain" "$config" ynh_replace_string "__PATH__" "$path_url" "$config" ynh_replace_string "__DB_NAME__" "$db_name" "$config" From 1b21d9cf05e94e0229b212645388390bc070a3d8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 10 Apr 2019 13:40:19 +0200 Subject: [PATCH 3/3] Fix ynh_string_random --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 63381d08..0d789cd6 100644 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC -app_key=$(ynh_string_random --length=32) +app_key=$(ynh_string_random 32) app=$YNH_APP_INSTANCE_NAME