From 96bb49b46bbe06382446e36b95e2620c086b1e35 Mon Sep 17 00:00:00 2001 From: mastereur <22839524+mastereur@users.noreply.github.com> Date: Mon, 7 Nov 2022 16:57:00 +0100 Subject: [PATCH] Scripts Improvement - Remove deprecated config option - Fix scripts --- conf/nginx.conf | 5 ----- scripts/install | 9 ++++++++- scripts/upgrade | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 8c3211e..06a9322 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/htdocs/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file diff --git a/scripts/install b/scripts/install index b07ef51..db105ea 100644 --- a/scripts/install +++ b/scripts/install @@ -114,9 +114,16 @@ touch $final_path/htdocs/conf/conf.php #================================================= ynh_script_progression --message="Configuring PHP-FPM" --weight=2 +fpm_footprint="medium" +fpm_usage="medium" + +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage + # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint -phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) +# Used by ynh_add_nginx_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index f155c15..cc68717 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,7 +29,7 @@ datadir=$final_path/documents/ fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) -phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION