From 1f61c656cb732d2e028d3deee889706dcb210824 Mon Sep 17 00:00:00 2001 From: Moul Date: Tue, 2 Jun 2015 16:53:19 -0400 Subject: [PATCH] update package, add cpu conf --- README.md | 2 +- manifest.json | 7 +++++++ scripts/install | 8 ++++---- scripts/remove | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b4a6843..e3573db 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ * [uCoin project](http://ucoin.io) * [YunoHost project](https://yunohost.org/#/) * For Debian Jessie -* There is still issue installing uCoin on Debian +* There is still issue installing uCoin on ARM diff --git a/manifest.json b/manifest.json index a702d71..4312af6 100644 --- a/manifest.json +++ b/manifest.json @@ -63,6 +63,13 @@ "en": "Password of your account", "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 ?" + } } ] } diff --git a/scripts/install b/scripts/install index 01d4754..de76cfa 100755 --- a/scripts/install +++ b/scripts/install @@ -7,11 +7,11 @@ sync_node=$3 sync_port=$4 salt=$5 pwd=$6 +cpu=$7 # Install dependencies: nodejs, npm sudo apt-get -y -qq install nodejs npm nodejs-legacy sudo npm install -g npm -sudo apt-get -y -qq install node-gyp # Install uCoin node and pm2 daemon manager sudo npm install -g ucoin pm2 @@ -25,9 +25,9 @@ fi # Open port in firewall sudo yunohost firewall allow TCP $port > /dev/null 2>&1 -# Init and configure uCoin node -ucoind init $sync_node $sync_port -ucoind config --noupnp --remoteh $domain --port $port --salt $salt --passwd $pwd +# Configure and sync uCoin node +ucoind config --noupnp --remoteh $domain --port $port --salt $salt --passwd $pwd --cpu $cpu / 100 +ucoind sync $sync_node $sync_port # Launch uCoin node with daemon pm2 pm2 start /usr/bin/ucoind -- start --noupnp diff --git a/scripts/remove b/scripts/remove index cb855ed..cf8073e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,7 +8,7 @@ pm2 delete ucoind # Remove uCoin node sudo npm remove ucoin pm2 -sudo apt-get -y remove nodejs node-gyp npm +sudo apt-get -y remove nodejs npm # Close opened port sudo yunohost firewall disallow TCP $port