2015-05-24 23:01:16 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-02-21 14:51:22 +01:00
|
|
|
# Exit and treat unset variables as an error
|
|
|
|
set -u
|
|
|
|
|
2016-05-31 15:26:06 +02:00
|
|
|
# Source app helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
2017-06-14 11:42:33 +02:00
|
|
|
source functions.sh
|
2016-05-31 15:26:06 +02:00
|
|
|
|
2016-06-23 13:27:00 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2016-05-31 15:26:06 +02:00
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
port=$(ynh_app_setting_get $app port)
|
2015-12-25 21:33:56 +01:00
|
|
|
|
2017-03-31 11:33:59 +02:00
|
|
|
REMOVE_DUNITER
|
2015-12-02 21:41:55 +01:00
|
|
|
|
2016-06-28 13:55:13 +02:00
|
|
|
# Remove data and conf
|
2020-06-11 19:00:12 +02:00
|
|
|
rm -rf $USER/.conf/duniter
|
2016-06-28 13:55:13 +02:00
|
|
|
|
2016-05-02 15:08:31 +02:00
|
|
|
# Remove Duniter service to YunoHost monitoring
|
2018-11-29 17:03:39 +01:00
|
|
|
yunohost service remove $app
|
2015-12-02 21:41:55 +01:00
|
|
|
|
2017-03-14 09:41:28 +01:00
|
|
|
# Remove Nginx configuration
|
2018-11-29 17:03:39 +01:00
|
|
|
rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
service nginx reload
|
2015-12-25 21:33:56 +01:00
|
|
|
|
2015-05-24 23:01:16 +02:00
|
|
|
# Close opened port
|
2018-11-29 17:03:39 +01:00
|
|
|
yunohost firewall disallow TCP $port
|
2020-06-11 19:00:12 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|