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:
parent
7ad95d01e3
commit
4562cf832e
3 changed files with 9 additions and 10 deletions
|
@ -76,6 +76,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 ?"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ?"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -11,8 +11,7 @@ sync_node=$4
|
||||||
sync_port=$5
|
sync_port=$5
|
||||||
salt=$6
|
salt=$6
|
||||||
password=$7
|
password=$7
|
||||||
#cpu=$(($7/100))
|
cpu=`bc -l <<< "scale=2; $8/100"`
|
||||||
#cpu=`expr $7 / 100`
|
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain$path -a $app
|
sudo yunohost app checkurl $domain$path -a $app
|
||||||
|
@ -47,7 +46,7 @@ UCOIN_DIR="/home/admin/.ucoin"
|
||||||
|
|
||||||
# Configure uCoin node
|
# Configure uCoin node
|
||||||
ucoind init --autoconf
|
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
|
# Synchronize uCoin node
|
||||||
echo "Synchronizing with $sync_node:$sync_port. It may take a while. More than ten minutes"
|
echo "Synchronizing with $sync_node:$sync_port. It may take a while. More than ten minutes"
|
||||||
|
|
Loading…
Reference in a new issue