This commit is contained in:
qo-op 2020-05-12 01:33:29 +02:00
parent a806dfc6fb
commit da8a0d4f23
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ find $DIR/ -cmin +20 -type f -name "duniter_*" -exec rm -f '{}' \;
if [[ ! -f $DIR/duniter_nodes.txt ]]; then
# Get New BMAS known Nodes list from shuffle one $DIR/good.nodes.txt
[[ -f $DIR/good.nodes.txt ]] && DUNITER=$(shuf -n 1 $DIR/good.nodes.txt) || DUNITER="duniter-g1.p2p.legal:443"
curl -s https://$DUNITER/network/peers | jq '.peers[] | .endpoints' | grep BMAS | awk '{print $2,$3}' | sed s/\"//g | sed s/\,//g | sed s/\ /:/g > $DIR/duniter_nodes.txt
curl -s https://$DUNITER/network/peers | jq '.peers[] | .endpoints' | grep BMAS | awk '{print $2,$3}' | sed s/\"//g | sed s/\,//g | sed s/\ /:/g | sort -u > $DIR/duniter_nodes.txt
fi
# Grab the nodes we are actively watching - they will be in bold in the final output

View File

@ -69,7 +69,7 @@ find $DIR/ -cmin +20 -type f -name "duniter_*" -exec rm -f '{}' \;
if [[ ! -f $DIR/duniter_nodes.txt ]]; then
# Get New BMAS known Nodes list from shuffle one $DIR/good.nodes.txt
[[ -f $DIR/good.nodes.txt ]] && DUNITER=$(shuf -n 1 $DIR/good.nodes.txt) || DUNITER="duniter-g1.p2p.legal:443"
curl -s https://$DUNITER/network/peers | jq '.peers[] | .endpoints' | grep BMAS | awk '{print $2,$3}' | sed s/\"//g | sed s/\,//g | sed s/\ /:/g > $DIR/duniter_nodes.txt
curl -s https://$DUNITER/network/peers | jq '.peers[] | .endpoints' | grep BMAS | awk '{print $2,$3}' | sed s/\"//g | sed s/\,//g | sed s/\ /:/g | sort -u > $DIR/duniter_nodes.txt
fi
# Grab the nodes we are actively watching - they will be in bold in the final output