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

47 lines
1.4 KiB
Text
Raw Normal View History

2021-11-10 19:58:54 +01:00
#!/bin/bash
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
2021-11-15 20:16:45 +01:00
source ynh_add_swap
2021-11-10 19:58:54 +01:00
source /usr/share/yunohost/helpers
#=================================================
2024-03-29 11:34:46 +01:00
# REMOVE SYSTEM CONFIGURATIONS
2021-11-10 19:58:54 +01:00
#=================================================
2024-03-29 11:34:46 +01:00
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
2021-11-10 19:58:54 +01:00
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
2024-03-29 11:34:46 +01:00
if ynh_exec_warn_less yunohost service status "$app-web" >/dev/null; then
yunohost service remove "$app-web"
2021-11-10 19:58:54 +01:00
fi
2024-03-29 11:34:46 +01:00
ynh_remove_systemd_config --service="$app-web"
2021-11-10 19:58:54 +01:00
2024-03-29 11:34:46 +01:00
if ynh_exec_warn_less yunohost service status "$app-sidekiq" >/dev/null; then
yunohost service remove "$app-sidekiq"
2021-11-10 19:58:54 +01:00
fi
ynh_remove_systemd_config --service="$app-sidekiq"
ynh_remove_nginx_config
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_secure_remove --file="/etc/$app"
2024-03-29 11:34:46 +01:00
ynh_script_progression --message="Removing Swap..." --weight=1
2021-11-15 20:16:45 +01:00
ynh_del_swap
2024-03-29 11:34:46 +01:00
ynh_script_progression --message="Uninstalling Ruby..." --weight=1
ynh_remove_ruby
2021-11-10 19:58:54 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last