From 2e0f65d1472b2ded396454e0d1fc7e324d896d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:37:17 +0100 Subject: [PATCH] Fix --- scripts/_common.sh | 4 ++++ scripts/install | 7 +++++++ scripts/remove | 8 ++++++++ scripts/restore | 7 +++++++ 4 files changed, 26 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index b7c971c..9374b12 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,10 @@ YNH_PHP_VERSION="8.0" +php_dependencies="php$YNH_PHP_VERSION-fpm" + +pkg_dependencies="$php_dependencies" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index f2959db..79e7013 100644 --- a/scripts/install +++ b/scripts/install @@ -54,6 +54,13 @@ 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 +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # STANDARD MODIFICATIONS #================================================= diff --git a/scripts/remove b/scripts/remove index e02ed9c..ceced2a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -47,6 +47,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 0a9ece4..c13891e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,6 +64,13 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #=================================================