diff --git a/scripts/install b/scripts/install index 29a76b9..8fa2f6d 100644 --- a/scripts/install +++ b/scripts/install @@ -76,7 +76,8 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=5 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_install_app_dependencies "$extra_php_dependencies" +ynh_add_fpm_config #================================================= # ADD A CONFIGURATION diff --git a/scripts/remove b/scripts/remove index 222ce56..8c4ebd5 100644 --- a/scripts/remove +++ b/scripts/remove @@ -41,10 +41,13 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 # Remove the app dependencies installed along with php-fpm -# ynh_remove_app_dependencies +ynh_remove_app_dependencies # Remove the dedicated PHP-FPM config -ynh_remove_fpm_config --package="$extra_php_dependencies" +# NB: If there is a warning because it cannot locate the garradin-ynh-deps package, ignore +# It's just it has been removed before. +# https://github.com/YunoHost/yunohost/blob/509ba1e8a28e0be598aa0617eda06669b7b0f1d8/data/helpers.d/php#L284-L287 +ynh_remove_fpm_config 2> >(grep -v 'WARNING E: Unable to locate package') #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 98e376a..d2ec51c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,7 +97,8 @@ then # Set permissions on app files ynh_system_user_create --username=$app ynh_add_nginx_config - ynh_add_fpm_config --package="$extra_php_dependencies" + ynh_install_app_dependencies "$extra_php_dependencies" + ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) ynh_script_progression --message="restore data..." --weight=10 @@ -144,7 +145,8 @@ then # Set permissions on app files ynh_system_user_create --username=$app ynh_add_nginx_config - ynh_add_fpm_config --package="$extra_php_dependencies" + ynh_install_app_dependencies "$extra_php_dependencies" + ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) ynh_script_progression --message="restore data..." --weight=10 @@ -213,7 +215,8 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_install_app_dependencies "$extra_php_dependencies" +ynh_add_fpm_config #======================================================= # backup bdd, squelettes directory and config.local.php