2015-05-02 12:48:23 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-03-18 19:14:28 +01:00
|
|
|
# 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
|
2017-03-18 19:14:28 +01:00
|
|
|
app=ihatemoney
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
db_user=$app
|
|
|
|
db_name=$app
|
2015-05-02 12:48:23 +02:00
|
|
|
|
2017-06-20 16:27:48 +02:00
|
|
|
# Stop service
|
2020-07-01 17:14:15 +02:00
|
|
|
supervisorctl stop budget
|
2017-06-20 16:27:48 +02:00
|
|
|
|
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 18:22:22 +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
|
|
|
|
2020-07-01 18:22:22 +02:00
|
|
|
# Remove app dependencies
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
|
2015-05-02 12:48:23 +02:00
|
|
|
# Delete user
|
2020-07-01 17:14:15 +02:00
|
|
|
userdel ihatemoney
|