From e1e511e67b7fa79ff25e05bcb98295864ba0aa75 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 4 Jan 2022 20:29:31 +0100 Subject: [PATCH] Apply last example_ynh --- doc/DISCLAIMER.md | 3 +-- doc/DISCLAIMER_fr.md | 3 +-- scripts/_common.sh | 1 + scripts/remove | 16 ++++++++-------- scripts/restore | 3 ++- scripts/upgrade | 1 + 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 576ef0a..23eca0e 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,2 +1 @@ -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * LDAP module can be installed +* LDAP module can be installed diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 7a8ff5f..091edf3 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,2 +1 @@ -* Toute limitation connue, contrainte ou élément qui ne fonctionne pas, comme (mais sans s'y limiter) : - * Le module d'authentification LDAP peut être installé +* Le module d'authentification LDAP peut être installé diff --git a/scripts/_common.sh b/scripts/_common.sh index e5daee9..88b3046 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,7 @@ YNH_PHP_VERSION="7.3" +# dependencies used by the app pkg_dependencies="curl libzip-dev php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-soap" #================================================= diff --git a/scripts/remove b/scripts/remove index 5fba8f1..f0c04b5 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,14 +31,6 @@ ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -63,6 +55,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index 40f3f7a..3f90a5d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,7 +39,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index 51bb121..8cf2e6a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed)