sort -u
This commit is contained in:
parent
a806dfc6fb
commit
da8a0d4f23
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue