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

Some cleanning.

This commit is contained in:
Moul 2015-12-29 16:11:22 +04:00
parent 145e0d537b
commit c92162d5d8
3 changed files with 8 additions and 24 deletions

View file

@ -35,25 +35,20 @@ bash ../sources/install.sh
UCOIN_DIR="/home/admin/.ucoin"
[ -s "$UCOIN_DIR/ucoin.sh" ] && . "$UCOIN_DIR/ucoin.sh"
printf "\nexport UCOIN_DIR=\"$UCOIN_DIR\"\n[ -s \"\$UCOIN_DIR/ucoin.sh\" ] && . \"\$UCOIN_DIR/ucoin.sh\" # This loads ucoin.sh\n" >> /home/admin/.bashrc
#source /home/admin/.bashrc
#exec bash -l
#sudo bash
#env
# Configure uCoin node
ucoind init --autoconf
ucoind config --remoteh $domain --port $port --remotep $port --salt $salt --passwd $password # --cpu $cpu
# Synchronize uCoin node
echo "Synchronizing with $sync_node:$sync_port"
echo "Synchronizing with $sync_node:$sync_port. It may take a while. More than ten minutes"
ucoind sync $sync_node $sync_port --nointeractive > /dev/null 2>&1
# Launch uCoin node
ucoind start
# Add uCoin service to the YunoHost monitoring
sudo yunohost service add $app --log /root/.config/ucoin/ucoin_default/ucoin.log
#/var/log/$app.log
sudo yunohost service add $app --log /home/admin/.config/ucoin/ucoin_default/ucoin.log
# SSOwat Configuration
sudo yunohost app setting $app skipped_uris -v "/"

View file

@ -6,12 +6,9 @@ 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
rm -Rf /home/admin/.ucoin
rm -Rf /home/admin/.config/ucoin/
# Remove uCoin service to YunoHost monitoring
sudo yunohost service remove ucoin
@ -20,9 +17,5 @@ sudo yunohost service remove ucoin
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

View file

@ -3,12 +3,8 @@
#set -e
app=ucoin
data_path=$(sudo yunohost app setting $app data_path)
# Upgrade uCoin package
cd $data_path
git pull
sudo npm install
# Update uCoin daemon
sudo pm2 update ucoin
# get new install script
#curl -kL https://raw.githubusercontent.com/ucoin-io/ucoin/master/install.sh | bash
ucoind restart