1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00
synapse_ynh/scripts/remove
Josué Tille d7dbe9f70b
Small fix
2024-08-31 19:04:39 +02:00

66 lines
1.9 KiB
Bash
Executable file

#!/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