forked from axiom-team/g1-stats
Import silkaj custom path
This commit is contained in:
parent
1600461097
commit
c4d7cea7ba
|
@ -1,3 +1,4 @@
|
|||
DUNITER="https://duniter-g1.p2p.legal" # Adresse du noeud Duniter qui sera scanné
|
||||
ESNODE="http://g1.data.duniter.fr" # Adresse du noeud ElasticSearch qui sera scanné (Si nécessaire)
|
||||
WEBPATH="/var/www/g1-stats" # Dossier qui sera créé si vous choisissez l'option web pour la mise en ligne des données (nécessite une configuration apache ou nginx)
|
||||
SILKAJ="" # Chemin vers Silkaj (Récupéré automatiquement si non renseigné)
|
||||
|
|
|
@ -7,13 +7,14 @@ source $GPATH/.env
|
|||
node=$(cut -d '/' -f3 <<<"$DUNITER")
|
||||
|
||||
#Check if Silkaj is installed
|
||||
[[ ! $(which silkaj) ]] && echo "Erreur: Vous devez installer Silkaj." && exit 1
|
||||
[[ -z $SILKAJ ]] && SILKAJ=$(which silkaj)
|
||||
[[ -z $SILKAJ ]] && echo "Erreur: Vous devez installer Silkaj." && exit 1
|
||||
rm -f silkaj_error.log
|
||||
|
||||
work() {
|
||||
for i in $wallets; do
|
||||
exec() {
|
||||
balance=$(silkaj -p $node balance $i 2>/dev/null)
|
||||
balance=$($SILKAJ -p $node balance $i 2>/dev/null)
|
||||
}
|
||||
exec
|
||||
while [[ $? == 1 ]]; do echo "Erreur $k: $i" | tee -a silkaj_error.log; ((k++)); exec; done
|
||||
|
@ -59,4 +60,4 @@ cp $GPATH/tpl/wallets_balance.html $WEBPATH/data/wallets_balance.html
|
|||
|
||||
echo "$htmlBloc" > /tmp/solde_g1_html.txt
|
||||
printf '%s\n' '/_LINE/r /tmp/solde_g1_html.txt' 1 '/_LINE/d' w | ed $WEBPATH/data/wallets_balance.html > /dev/null
|
||||
rm /tmp/solde_g1_html.txt
|
||||
rm /tmp/solde_g1_html.txt
|
||||
|
|
Loading…
Reference in New Issue