1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/funkwhale_ynh.git synced 2024-09-03 18:36:24 +02:00
funkwhale_ynh/scripts/remove

66 lines
2 KiB
Text
Raw Permalink Normal View History

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
if ynh_hide_warnings yunohost service status "${app}-server" >/dev/null
then
ynh_script_progression "Removing ${app}-server service integration..."
yunohost service remove "${app}-server"
fi
if ynh_hide_warnings yunohost service status "${app}-worker" >/dev/null
then
ynh_script_progression "Removing ${app}-worker service integration..."
yunohost service remove "${app}-worker"
fi
if ynh_hide_warnings yunohost service status "${app}-beat" >/dev/null
then
ynh_script_progression "Removing ${app}-beat service integration..."
yunohost service remove "${app}-beat"
fi
2019-01-14 21:30:46 +01:00
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression "Stopping and removing the systemd service..."
2019-01-14 21:30:46 +01:00
ynh_systemctl --service="${app}-beat" --action="stop" --log_path="systemd"
ynh_systemctl --service="${app}-server" --action="stop" --log_path="systemd"
ynh_systemctl --service="${app}-worker" --action="stop" --log_path="systemd"
2019-01-14 21:30:46 +01:00
# Remove the dedicated systemd config
ynh_config_remove_systemd"${app}-beat"
ynh_config_remove_systemd"${app}-server"
ynh_config_remove_systemd"${app}-worker"
2019-01-14 21:30:46 +01:00
ynh_safe_rm "/etc/systemd/system/$app.target"
2019-01-14 21:30:46 +01:00
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression "Removing NGINX web server configuration..."
# Remove the dedicated NGINX config
ynh_safe_rm "/etc/nginx/conf.d/$domain.d/funkwhale_proxy.conf"
ynh_config_remove_nginx
ynh_config_remove_logrotate
ynh_config_remove_fail2ban
2021-08-04 23:53:34 +02:00
ynh_redis_remove_db $redis_db
2019-04-03 14:35:09 +02:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Removal of $app completed"