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

37 lines
799 B
Text
Raw Normal View History

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
# Source app helpers
source /usr/share/yunohost/helpers
source functions.sh
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port)
REMOVE_DUNITER
# Disable systemd service
systemctl disable duniter.service
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
# Remove Duniter service to YunoHost monitoring
yunohost service remove $app
2017-03-14 09:41:28 +01:00
# Remove Nginx configuration
rm -f /etc/nginx/conf.d/$domain.d/$app.conf
2020-06-29 18:06:53 +02:00
systemctl reload nginx
2015-05-24 23:01:16 +02:00
# Close opened port
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