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

35 lines
706 B
Text
Raw Normal View History

2015-05-02 12:48:23 +02:00
#!/bin/bash
# Source YunoHost helpers
source /usr/share/yunohost/helpers
2015-05-02 12:48:23 +02:00
# 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
2015-05-02 12:48:23 +02:00
# Stop service
2020-07-01 17:14:15 +02:00
supervisorctl stop budget
2015-05-02 12:48:23 +02:00
# Drop database
2017-06-19 01:59:53 +02:00
ynh_mysql_drop_db $db_name
ynh_mysql_drop_user $db_user
2015-05-02 12:48:23 +02:00
2018-06-24 01:41:02 +02:00
# Remove src and venv
2020-07-01 17:14:15 +02:00
ynh_secure_remove /opt/yunohost/ihatemoney/
2015-05-02 12:48:23 +02:00
# Remove settings
2020-07-01 17:14:15 +02:00
ynh_secure_remove /etc/ihatemoney
ynh_secure_remove /etc/supervisor/conf.d/ihatemoney.conf
ynh_remove_nginx_config
2015-05-02 12:48:23 +02:00
# Restart services
2020-07-01 17:14:15 +02:00
systemctl force-reload supervisor
2015-05-02 12:48:23 +02:00
# Delete user
2020-07-01 17:14:15 +02:00
userdel ihatemoney