forked from axiom-team/astrXbian
A_boostrap_nodes.txt format change
This commit is contained in:
parent
bebb93ebc9
commit
8aa121b7b0
|
@ -1,5 +1,5 @@
|
|||
# CONTAINS G1PUB of bootstrap PUB Station
|
||||
# oasis.astroport.com
|
||||
2jQUH4HfHxdTesjCjvMCx1VJgA5AnpuvrWRq1swfRdsS
|
||||
# aries.copylaradio.com (thuya83pk)
|
||||
HbBJDXDrN8swxvMohMxmegYRyZ7m99jqgxwwN1gwxck2
|
||||
# CONTAINS Address of 1st Bootstrap Stations (24/24 Public IP)
|
||||
# oasis.astroport.com = 2jQUH4HfHxdTesjCjvMCx1VJgA5AnpuvrWRq1swfRdsS
|
||||
/ip4/51.15.166.54/tcp/4001/p2p/12D3KooWBYme2BsNUrtx4mEdNX6Yioa9AV7opWzQp6nrPs6ZKabN
|
||||
# aries.copylaradio.com (thuya83pk) = HbBJDXDrN8swxvMohMxmegYRyZ7m99jqgxwwN1gwxck2
|
||||
/ip4/37.187.127.175/tcp/4001/p2p/12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx
|
||||
|
|
18
ISOconfig.sh
18
ISOconfig.sh
|
@ -132,15 +132,19 @@ echo "CREATING CESIUM+ PROFILE"
|
|||
########################################################################
|
||||
echo "BECOME FRIEND with A_boostrap_nodes.txt"
|
||||
########################################################################
|
||||
for g1node in $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#") # remove comments
|
||||
for bootnode in $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#") # remove comments
|
||||
do
|
||||
if [[ "$g1node" != "" ]]; then
|
||||
echo "SENDING STAR TO BOOTSTRAP NODE : $g1node"
|
||||
if [[ $bootnode != "" ]]; then
|
||||
ipfsnodeid=${bootnode##*/}
|
||||
g1node=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid)
|
||||
echo "SENDING STAR TO BOOTSTRAP NODE : $g1node"
|
||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://g1.data.e-is.pro" stars -p $g1node -n 1
|
||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars -p $g1node -n 1
|
||||
### DELETE
|
||||
# ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://g1.data.e-is.pro" unstars -p $g1node
|
||||
# ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" unstars -p $g1node
|
||||
## ADD TO BOOTSTRAP
|
||||
ipfs bootstrap add $bootnode
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -195,10 +199,12 @@ echo 'Sending "ipfstryme" message'
|
|||
########################################################################
|
||||
echo 'Sending \"ipfstryme\" message to BOOTSTRAP nodes' # Add bootstrap in A_boostrap_nodes.txt
|
||||
########################################################################
|
||||
for g1node in $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#") # remove comments
|
||||
for bootnode in $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#") # remove comments
|
||||
do
|
||||
if [[ $g1node != "" ]]; then
|
||||
echo "SENDING ipfstryme to BOOTSTRAP node : $g1node"
|
||||
if [[ $bootnode != "" ]]; then
|
||||
ipfsnodeid=${bootnode##*/}
|
||||
g1node=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid)
|
||||
echo "SENDING ipfstryme to BOOTSTRAP node : $g1node"
|
||||
# ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://g1.data.le-sou.org" send -d $g1node -t "ipfstryme" -f ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" send -d $g1node -t "ipfstryme" -f ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
fi
|
||||
|
|
|
@ -100,7 +100,9 @@ fi
|
|||
#### FRIENDS && BOOTSTRAP ipfstryme MESSAGE sending procedure
|
||||
########################################################################
|
||||
# GET LIST of issuer(s) who likes me & A_boostrap_nodes.txt
|
||||
IamBOOTSTRAP=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep "$G1PUB") # AM I A BOOTSTRAP ?
|
||||
IamINBOOTSTRAP=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep "$IPFSNODEID") # AM I A BOOTSTRAP ?
|
||||
ipfsnodeid=${IamINBOOTSTRAP##*/}
|
||||
IamBOOTSTRAP=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid) # Contains G1PUB
|
||||
|
||||
################## AUTO PINNING for BOOTSTRAP
|
||||
[[ $IamBOOTSTRAP ]] && ~/.zen/astrXbian/zen/tools/autoPINfriends.sh
|
||||
|
@ -108,7 +110,7 @@ IamBOOTSTRAP=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep "$G1PUB") # AM I
|
|||
|
||||
|
||||
################## CHECKING WHO GAVE ME STARS
|
||||
for liking_me in $(~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' && cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#");
|
||||
for liking_me in $(~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' && ~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | shuf) );
|
||||
do
|
||||
##### BOOTSTRAP AUTO LIKE BACK (NOT liking Myself)
|
||||
if [[ "$IamBOOTSTRAP" == "$G1PUB" ]]; then
|
||||
|
|
|
@ -188,7 +188,10 @@ echo "$IPFSID" > /tmp/.ipfsid
|
|||
########################################################################
|
||||
################ ask autoPIN to one shuffle A_boostrap_nodes
|
||||
########################################################################
|
||||
PINnode=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | shuf | tail -n 1)
|
||||
PINIPFSnode=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | shuf | tail -n 1)
|
||||
nodeid=${PINIPFSnode##*/}
|
||||
PINnode=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $nodeid)
|
||||
|
||||
echo "ASK AUTOPIN to $PINnode"
|
||||
## CREATE $PINnode IPFS communication directory
|
||||
[[ ! -d ~/.zen/ipfs/.${IPFSNODEID}/KEY/${INDEXPREFIX}${REFERENCE}/${G1PUB}/${PINnode} ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID}/KEY/${INDEXPREFIX}${REFERENCE}/${G1PUB}/${PINnode}
|
||||
|
|
Loading…
Reference in New Issue