1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00
ihatemoney_ynh/scripts/remove
2020-07-26 18:20:17 +02:00

37 lines
760 B
Bash
Executable file

#!/bin/bash
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# supervisord and other Debian dependencies remain installed
# there is no way to know if they are used by other programs
# Retrieve arguments
app=ihatemoney
domain=$(ynh_app_setting_get $app domain)
db_user=$app
db_name=$app
# Stop service
supervisorctl stop budget
# Drop database
ynh_mysql_drop_db $db_name
ynh_mysql_drop_user $db_user
# Remove src and venv
ynh_secure_remove /opt/yunohost/ihatemoney
# Remove settings
ynh_secure_remove /etc/ihatemoney
ynh_secure_remove /etc/supervisor/conf.d/ihatemoney.conf
ynh_remove_nginx_config
# Restart services
systemctl force-reload supervisor
# Remove app dependencies
ynh_remove_app_dependencies
# Delete user
userdel ihatemoney