1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/superset_ynh.git synced 2024-09-03 20:26:31 +02:00
superset_ynh/scripts/remove

46 lines
1.4 KiB
Text
Raw Normal View History

2022-04-16 22:59:26 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
2024-01-23 23:44:36 +01:00
# REMOVE USER DATABASE
2022-04-16 22:59:26 +02:00
#=================================================
2024-01-23 23:44:36 +01:00
ynh_script_progression --message="Removing user database for $app..."
2022-04-16 22:59:26 +02:00
2024-01-26 19:46:53 +01:00
ynh_psql_remove_db --db_user=$userdata_db_user --db_name=$userdata_db_name
2022-04-16 22:59:26 +02:00
#=================================================
2024-01-23 23:44:36 +01:00
# REMOVE SYSTEM CONFIGURATIONS
2022-04-16 22:59:26 +02:00
#=================================================
2024-01-23 23:44:36 +01:00
# REMOVE SYSTEMD SERVICE
2022-04-16 22:59:26 +02:00
#=================================================
2024-01-23 23:44:36 +01:00
ynh_script_progression --message="Removing system configurations related to $app..."
2022-04-16 22:59:26 +02:00
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
then
2024-01-23 23:44:36 +01:00
ynh_script_progression --message="Removing $app service integration..."
2022-04-16 22:59:26 +02:00
yunohost service remove $app
fi
ynh_remove_systemd_config
ynh_remove_nginx_config
2024-01-23 23:44:36 +01:00
ynh_remove_logrotate
2022-04-16 22:59:26 +02:00
2024-01-23 23:44:36 +01:00
# Remove other various files specific to the app... such as :
2022-04-16 22:59:26 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2024-01-23 23:44:36 +01:00
ynh_script_progression --message="Removal of $app completed" --last