From 47cfc1c721c450c1c07e4b36f91941acfa08e1b8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 15 Aug 2021 14:40:30 +0200 Subject: [PATCH] Reorder steps --- scripts/remove | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/remove b/scripts/remove index 9b5910b..bc9d73f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -54,27 +54,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 config file detection -delete_initZabbixConf - -DEBIAN_FRONTEND=noninteractive apt-get purge zabbix-release -y - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -# Force removing if ynh_remove_app_dependencies not work (old zabbix version) -for zabbix_pkg in $(apt list --installed | grep -Po "\K(zabbix-.*)(?=/)") -do - DEBIAN_FRONTEND=noninteractive apt-get purge --allow-change-held-packages "$zabbix_pkg" -y -done - -remove_zabbix_repo - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -99,6 +78,27 @@ 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 config file detection +delete_initZabbixConf + +DEBIAN_FRONTEND=noninteractive apt-get purge zabbix-release -y + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + +# Force removing if ynh_remove_app_dependencies not work (old zabbix version) +for zabbix_pkg in $(apt list --installed | grep -Po "\K(zabbix-.*)(?=/)") +do + DEBIAN_FRONTEND=noninteractive apt-get purge --allow-change-held-packages "$zabbix_pkg" -y +done + +remove_zabbix_repo + #================================================= # SPECIFIC REMOVE #=================================================