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

28 lines
621 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#set -e
app=ucoin
domain=$(sudo yunohost app setting $app domain)
port=$(sudo yunohost app setting $app port)
# Remove uCoin node daemon
sudo pm2 delete ucoin
# Remove uCoin node
#sudo npm remove ucoin
sudo rm -rf /home/yunohost.app/ucoin
# Remove uCoin service to YunoHost monitoring
sudo yunohost service remove ucoin
# Remove proxy_pass
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
sudo service nginx reload
# I can't remove thoses packages which could be used by other apps
#sudo npm remove pm2
#sudo apt -y -qq remove nodejs npm
# Close opened port
sudo yunohost firewall disallow TCP $port