From 28d78782570008dbce971d0daaf73c95c2c14942 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 25 Mar 2022 13:55:27 +0100 Subject: [PATCH] pkg_dependencies --- scripts/_common.sh | 4 +--- scripts/install | 2 +- scripts/remove | 18 ++++++++---------- scripts/restore | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 99620df..766cc0e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,9 +7,7 @@ YNH_PHP_VERSION="7.3" # dependencies used by the app -extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json" - -pkg_dependencies="git" +pkg_dependencies="git php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 2fd179b..98cac05 100755 --- a/scripts/install +++ b/scripts/install @@ -90,7 +90,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 0612b15..164f4cf 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,16 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -54,6 +44,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated php-fpm config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 3097960..ff24d9d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -70,7 +70,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC RESTORATION