mirror of
https://github.com/YunoHost-Apps/duniter_ynh.git
synced 2024-09-03 18:26:35 +02:00
fe734e0ff4
Update remove
36 lines
799 B
Bash
Executable file
36 lines
799 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# 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
|
|
|
|
# Remove data and conf
|
|
rm -rf $USER/.conf/duniter
|
|
|
|
# Remove Duniter service to YunoHost monitoring
|
|
yunohost service remove $app
|
|
|
|
# Remove Nginx configuration
|
|
rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
systemctl reload nginx
|
|
|
|
# Close opened port
|
|
yunohost firewall disallow TCP $port
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|