#!/bin/bash source _common.sh source experimental_helper.sh source /usr/share/yunohost/helpers #================================================= # STANDARD REMOVE #================================================= # REMOVE SERVICE FROM ADMIN PANEL #================================================= # Remove a service from the admin panel, added by `yunohost service add` yunohost service remove "$app" yunohost service remove "$app"-coturn #================================================= # STOP AND REMOVE SERVICE #================================================= ynh_script_progression "Stopping and removing the systemd service" ynh_config_remove_systemd ynh_config_remove_systemd "$app"-coturn #================================================= # REMOVE APP MAIN DIR #================================================= ynh_script_progression "Removing app main directory" ynh_safe_rm "$code_dir" ynh_safe_rm /etc/matrix-"$app" ynh_safe_rm "/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" #================================================= # REMOVE NGINX CONFIGURATION #================================================= ynh_script_progression "Removing NGINX web server configuration" # Remove the dedicated nginx config ynh_config_remove_nginx # Remove the dedicated php-fpm config ynh_config_remove_phpfpm #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= ynh_script_progression "Removing logrotate configuration" # Remove the app-specific logrotate config ynh_config_remove_logrotate #================================================= # REMOVE FAIL2BAN CONFIGURATION #================================================= ynh_script_progression "Removing Fail2Ban configuration..." # Remove the dedicated fail2ban config ynh_config_remove_fail2ban #================================================= ynh_script_progression "Removal of $app completed" sleep 1