From 4159990552686e1e898399cd6c3b6f31d492ade8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 14:14:02 +0200 Subject: [PATCH] fix --- scripts/_common.sh | 3 +++ scripts/install | 2 +- scripts/remove | 5 +++-- scripts/upgrade | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d7614e9..2b57d2e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,9 @@ YNH_PHP_VERSION="7.3" +extra_php_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-soap php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-zip" + + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 86acc5a..047ccde 100644 --- a/scripts/install +++ b/scripts/install @@ -91,7 +91,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 4c4125f..45696e1 100644 --- a/scripts/remove +++ b/scripts/remove @@ -49,8 +49,9 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3 -# Remove the dedicated PHP-FPM config -ynh_remove_fpm_config +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index bd3ac8e..3ddc979 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,7 +103,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # SPECIFIC UPGRADE