2017-04-24 04:16:02 +02:00
|
|
|
#!/bin/bash
|
2015-09-29 02:28:53 +02:00
|
|
|
|
2018-02-02 16:59:51 +01:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2015-09-29 02:28:53 +02:00
|
|
|
|
2018-02-02 16:59:51 +01:00
|
|
|
source _common.sh
|
2017-04-24 04:16:02 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2015-09-29 02:28:53 +02:00
|
|
|
|
2019-06-16 00:06:51 +02:00
|
|
|
#=================================================
|
2024-03-25 22:28:52 +01:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2019-06-16 00:06:51 +02:00
|
|
|
#=================================================
|
2024-03-25 22:28:52 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2019-06-16 00:06:51 +02:00
|
|
|
|
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
|
|
|
|
# Remove the dedicated php-fpm config
|
|
|
|
ynh_remove_fpm_config
|
|
|
|
|
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
|
|
|
#=================================================
|
2024-03-25 22:28:52 +01:00
|
|
|
# REMOVE OLD FILES
|
2019-06-16 00:06:51 +02:00
|
|
|
#=================================================
|
2024-03-25 22:28:52 +01:00
|
|
|
# Delete old static pool.d conf
|
|
|
|
old_php_version=7.0
|
|
|
|
if [ -f "/etc/php/$old_php_version/fpm/pool.d/$app.conf" ]; then
|
|
|
|
ynh_secure_remove --file="/etc/php/$old_php_version/fpm/pool.d/$app.conf"
|
|
|
|
fi
|
2019-06-16 00:06:51 +02:00
|
|
|
|
|
|
|
# Remove a directory securely
|
2019-07-05 22:33:55 +02:00
|
|
|
ynh_secure_remove --file="/etc/$app"
|
2019-06-16 00:06:51 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2017-04-24 04:16:02 +02:00
|
|
|
|
2019-07-05 22:34:21 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|