2014-07-23 15:52:50 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-02-21 08:05:43 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2017-02-13 23:55:58 +01:00
|
|
|
|
2018-10-21 17:55:39 +02:00
|
|
|
#=================================================
|
2023-06-29 19:08:38 +02:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2018-10-21 17:55:39 +02:00
|
|
|
#=================================================
|
2023-06-29 19:08:38 +02:00
|
|
|
# REMOVE SYSTEMD SERVICE
|
2019-02-21 08:05:43 +01:00
|
|
|
#=================================================
|
2023-06-29 19:08:38 +02:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2019-02-21 08:05:43 +01:00
|
|
|
|
2023-11-01 16:57:59 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
|
|
|
|
2020-09-04 22:39:46 +02:00
|
|
|
# Remove the dedicated NGINX config
|
2019-02-21 08:05:43 +01:00
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
2023-11-01 16:57:59 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE PHP CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing PHP configuration..." --weight=1
|
|
|
|
|
2020-09-04 22:24:17 +02:00
|
|
|
# Remove the dedicated PHP-FPM config
|
2019-02-21 08:05:43 +01:00
|
|
|
ynh_remove_fpm_config
|
2014-07-23 15:52:50 +02:00
|
|
|
|
2023-11-01 16:57:59 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE CRON CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing Cron configuration..." --weight=1
|
|
|
|
|
2019-02-21 08:05:43 +01:00
|
|
|
# Remove a cron file
|
2022-10-02 23:03:44 +02:00
|
|
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
2019-02-21 08:05:43 +01:00
|
|
|
|
2023-11-01 16:57:59 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE LOG FILES
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing log files..." --weight=1
|
|
|
|
|
2022-10-03 00:00:06 +02:00
|
|
|
# Remove the log files
|
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
2023-11-01 16:57:59 +01:00
|
|
|
#=================================================
|
|
|
|
# REMOVE LOGROTATE CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
|
|
|
|
|
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE FAIL2BAN CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removing fail2ban configuration..." --weight=1
|
|
|
|
|
|
|
|
ynh_remove_fail2ban_config
|
|
|
|
|
2019-02-21 08:05:43 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2014-07-23 15:52:50 +02:00
|
|
|
|
2022-10-02 23:03:44 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|