From 8d4bd6a8345a4c8ce1f7b23c7d0ed8db1c8fd3de Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 29 Sep 2022 22:05:50 +0200 Subject: [PATCH] fix --- scripts/install | 13 ++++++++++--- scripts/upgrade | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index c9d76fe..a75d1d3 100644 --- a/scripts/install +++ b/scripts/install @@ -101,9 +101,16 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +fpm_footprint="low" +fpm_free_footprint=0 +fpm_usage="low" + +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage + +# Create a dedicated php-fpm config +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION #================================================= # SPECIFIC SETUP diff --git a/scripts/upgrade b/scripts/upgrade index 488fb83..cf55fb2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,6 +89,12 @@ if [ -z "$fpm_footprint" ]; then ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint fi +# If fpm_free_footprint doesn't exist, create it +if [ -z "$fpm_free_footprint" ]; then + fpm_free_footprint=0 + ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +fi + # If fpm_usage doesn't exist, create it if [ -z "$fpm_usage" ]; then fpm_usage=low