2015-10-17 10:47:21 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-03-07 23:33:32 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2015-10-17 10:47:21 +02:00
|
|
|
|
2018-03-07 23:33:32 +01:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2015-10-17 10:47:21 +02:00
|
|
|
|
2022-04-14 00:33:50 +02:00
|
|
|
#=================================================
|
2023-11-11 14:37:54 +01:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2018-03-07 23:33:32 +01:00
|
|
|
#=================================================
|
2023-11-11 14:37:54 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2018-03-07 23:33:32 +01:00
|
|
|
|
2022-04-13 20:36:45 +02:00
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
2021-07-22 15:39:20 +02:00
|
|
|
|
2021-01-05 23:31:12 +01:00
|
|
|
# Remove the dedicated NGINX config
|
2018-03-07 23:33:32 +01:00
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2021-01-05 23:31:12 +01:00
|
|
|
# Remove the dedicated PHP-FPM config
|
2018-03-07 23:33:32 +01:00
|
|
|
ynh_remove_fpm_config
|
|
|
|
|
2023-11-11 14:35:58 +01:00
|
|
|
if [ $database == "postgresql" ]
|
|
|
|
then
|
|
|
|
ynh_script_progression --message="Removing PostgreSQL database..." --weight=2
|
|
|
|
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
|
|
|
else
|
|
|
|
ynh_script_progression --message="Removing MySQL database..." --weight=2
|
|
|
|
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
|
|
|
fi
|
2021-01-05 23:31:12 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|