1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zabbix_ynh.git synced 2024-09-03 20:36:14 +02:00

Reorder steps

This commit is contained in:
yalh76 2021-08-15 14:40:30 +02:00
parent 73b4cdf3fa
commit 47cfc1c721

View file

@ -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
#=================================================