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

update package, add cpu conf

This commit is contained in:
Moul 2015-06-02 16:53:19 -04:00
parent 36c6d68703
commit 1f61c656cb
4 changed files with 13 additions and 6 deletions

View file

@ -3,4 +3,4 @@
* [uCoin project](http://ucoin.io) * [uCoin project](http://ucoin.io)
* [YunoHost project](https://yunohost.org/#/) * [YunoHost project](https://yunohost.org/#/)
* For Debian Jessie * For Debian Jessie
* There is still issue installing uCoin on Debian * There is still issue installing uCoin on ARM

View file

@ -63,6 +63,13 @@
"en": "Password of your account", "en": "Password of your account",
"fr": "Mot de passe de votre compte" "fr": "Mot de passe de votre compte"
} }
},
{
"name": "cpu",
"ask": {
"en": "Which CPU load limit would you like your uCoin node don't exceed?",
"fr": "Quel pourcentage de charge processeur ne souhaitez-vous pas que le nÅ“ud uCoin dÃpasse ?"
}
} }
] ]
} }

View file

@ -7,11 +7,11 @@ sync_node=$3
sync_port=$4 sync_port=$4
salt=$5 salt=$5
pwd=$6 pwd=$6
cpu=$7
# Install dependencies: nodejs, npm # Install dependencies: nodejs, npm
sudo apt-get -y -qq install nodejs npm nodejs-legacy sudo apt-get -y -qq install nodejs npm nodejs-legacy
sudo npm install -g npm sudo npm install -g npm
sudo apt-get -y -qq install node-gyp
# Install uCoin node and pm2 daemon manager # Install uCoin node and pm2 daemon manager
sudo npm install -g ucoin pm2 sudo npm install -g ucoin pm2
@ -25,9 +25,9 @@ fi
# Open port in firewall # Open port in firewall
sudo yunohost firewall allow TCP $port > /dev/null 2>&1 sudo yunohost firewall allow TCP $port > /dev/null 2>&1
# Init and configure uCoin node # Configure and sync uCoin node
ucoind init $sync_node $sync_port ucoind config --noupnp --remoteh $domain --port $port --salt $salt --passwd $pwd --cpu $cpu / 100
ucoind config --noupnp --remoteh $domain --port $port --salt $salt --passwd $pwd ucoind sync $sync_node $sync_port
# Launch uCoin node with daemon pm2 # Launch uCoin node with daemon pm2
pm2 start /usr/bin/ucoind -- start --noupnp pm2 start /usr/bin/ucoind -- start --noupnp

View file

@ -8,7 +8,7 @@ pm2 delete ucoind
# Remove uCoin node # Remove uCoin node
sudo npm remove ucoin pm2 sudo npm remove ucoin pm2
sudo apt-get -y remove nodejs node-gyp npm sudo apt-get -y remove nodejs npm
# Close opened port # Close opened port
sudo yunohost firewall disallow TCP $port sudo yunohost firewall disallow TCP $port