#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # STANDARD REMOVE #================================================= # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status "supervisor" >/dev/null then ynh_script_progression --message="Removing supervisor service..." yunohost service remove "supervisor" fi #================================================= # STOP AND REMOVE SERVICE #================================================= ynh_script_progression --message="Stopping and removing the supervisor service..." --weight=1 # Remove the dedicated supervisor config ynh_remove_supervisor_config --service="${app}-horizon" #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= ynh_script_progression --message="Removing logrotate configuration..." --weight=1 # Remove the app-specific logrotate config ynh_remove_logrotate #================================================= # REMOVE THE REDIS DATABASE #================================================= ynh_script_progression --message="Removing the Redis database..." --weight=1 ynh_redis_remove_db "$redis_db" #================================================= # REMOVE NGINX CONFIGURATION #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= # SPECIFIC REMOVE #================================================= # REMOVE VARIOUS FILES #================================================= ynh_script_progression --message="Removing various files..." --weight=1 # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" # Remove the log files #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Removal of $app completed" --last