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

Add CPU limit.

This commit is contained in:
Moul 2015-12-29 22:45:24 +04:00
parent 7ad95d01e3
commit 4562cf832e
3 changed files with 9 additions and 10 deletions

View file

@ -76,6 +76,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 ?"
}
}
]
}

View file

@ -1,7 +0,0 @@
{
"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Å<93>ud uCoin dÃpasse ?"
}
}

View file

@ -11,8 +11,7 @@ sync_node=$4
sync_port=$5
salt=$6
password=$7
#cpu=$(($7/100))
#cpu=`expr $7 / 100`
cpu=`bc -l <<< "scale=2; $8/100"`
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a $app
@ -47,7 +46,7 @@ UCOIN_DIR="/home/admin/.ucoin"
# Configure uCoin node
ucoind init --autoconf
ucoind config --remoteh $domain --port $port --remotep $port --salt $salt --passwd $password # --cpu $cpu
ucoind config --remoteh $domain --port $port --remotep $port --salt $salt --passwd $password --cpu $cpu
# Synchronize uCoin node
echo "Synchronizing with $sync_node:$sync_port. It may take a while. More than ten minutes"