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
|
|
|
|
sudo rm -rf /root/.conf/duniter
|
|
|
|
|
2016-05-02 15:08:31 +02:00
|
|
|
# Remove Duniter service to YunoHost monitoring
|
|
|
|
sudo yunohost service remove $app
|
2015-12-02 21:41:55 +01:00
|
|
|
|
2017-03-14 09:41:28 +01:00
|
|
|
# Remove Nginx configuration
|
2015-12-25 21:33:56 +01:00
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
sudo service nginx reload
|
|
|
|
|
2015-05-24 23:01:16 +02:00
|
|
|
# Close opened port
|
|
|
|
sudo yunohost firewall disallow TCP $port
|