peering peers only the one who sync
This commit is contained in:
parent
d74b7528b5
commit
e2dea7e5af
|
@ -114,17 +114,6 @@ do
|
|||
fi
|
||||
fi
|
||||
################################################################
|
||||
echo "@@ CREATING Peering.Peer @@"
|
||||
echo "jq '.Peering.Peers? += { \"Addrs\": [], \"ID\": \"'$ipfsnodeid'\" }'"
|
||||
################################################################
|
||||
Addr=$(echo "$peerline" | rev | cut -d '/' -f 2- | rev )
|
||||
IsAlreadythere=$(cat ~/.ipfs/config.new | grep '"$ipfsnodeid"') && echo $IsAlreadythere
|
||||
if [[ ! $IsAlreadythere ]]; then
|
||||
echo '{ "ID": "'$ipfsnodeid'", "Addrs": [] }' >> ~/.zen/A_peering_peers.txt
|
||||
#jq '.Peering.Peers? += { "Addrs": [], "ID": "'$ipfsnodeid'" }' ~/.ipfs/config.new > ~/.ipfs/config.wew && cp ~/.ipfs/config.wew ~/.ipfs/config.new
|
||||
jq '.Peering.Peers[.Peering.Peers| length] |= . + { "Addrs": [], "ID": "'$ipfsnodeid'" }' ~/.ipfs/config.new > ~/.ipfs/config.wew && cp ~/.ipfs/config.wew ~/.ipfs/config.new
|
||||
fi
|
||||
################################################################
|
||||
## Refresh bootstrap if XID exists
|
||||
[[ "$XID" != "" ]] && ipfs bootstrap rm "/ipfs/$ipfsnodeid" && ipfs bootstrap add "$peerline" || ipfs bootstrap rm "$peerline"
|
||||
################################################################
|
||||
|
@ -138,6 +127,17 @@ do
|
|||
then
|
||||
echo "TIMEOUT REACHED ___ SHOULD I REMOVE $ipfsnodeid FROM ~/.zen/A_my_swarm.txt? DO NOTHING";
|
||||
else
|
||||
################################################################
|
||||
echo "@@ CREATING Peering.Peer @@"
|
||||
echo "jq '.Peering.Peers? += { \"Addrs\": [], \"ID\": \"'$ipfsnodeid'\" }'"
|
||||
################################################################
|
||||
Addr=$(echo "$peerline" | rev | cut -d '/' -f 2- | rev )
|
||||
IsAlreadythere=$(cat ~/.ipfs/config.new | grep '"$ipfsnodeid"') && echo $IsAlreadythere
|
||||
if [[ ! $IsAlreadythere ]]; then
|
||||
echo '{ "ID": "'$ipfsnodeid'", "Addrs": [] }' >> ~/.zen/A_peering_peers.txt
|
||||
#jq '.Peering.Peers? += { "Addrs": [], "ID": "'$ipfsnodeid'" }' ~/.ipfs/config.new > ~/.ipfs/config.wew && cp ~/.ipfs/config.wew ~/.ipfs/config.new
|
||||
jq '.Peering.Peers[.Peering.Peers| length] |= . + { "Addrs": [], "ID": "'$ipfsnodeid'" }' ~/.ipfs/config.new > ~/.ipfs/config.wew && cp ~/.ipfs/config.wew ~/.ipfs/config.new
|
||||
fi
|
||||
################################################################
|
||||
echo "## REFRESH stargates keys from my friend"
|
||||
################################################################
|
||||
|
|
Loading…
Reference in New Issue