forked from axiom-team/astrXbian
check connectivity with bootstrap before initialisation - and extend like connectivity
This commit is contained in:
parent
2287f94a29
commit
a7e76a81dc
|
@ -18,7 +18,11 @@ IPFSNODEID=$(ipfs id -f='<id>\n')
|
|||
[ $(id -u) -eq 0 ] && echo "RUN as root FORBIDDEN. Please run with user: $YOU" && exit 1
|
||||
|
||||
rm -f /tmp/A_booting_log.txt
|
||||
## TEST ROUTEUR PRESENCE
|
||||
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` 2>&1>/dev/null && echo "CONNEXION OK" || exit 1
|
||||
## TEST BOOTSTRAP IP CONNECTIVITY
|
||||
IPTEST=$(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | cut -d '/' -f 3 | shuf | head -n 1)
|
||||
ping -q -w 1 -c 1 $IPTEST 2>&1>/dev/null && echo "CONNEXION OK" || echo "VERIFIER CONNEXION INTERNET" && exit 1
|
||||
|
||||
# GIT PULL astrXbian code
|
||||
mkdir -p ~/.zen/astrXbian && cd ~/.zen/astrXbian && git pull || exit 1
|
||||
|
|
|
@ -110,7 +110,7 @@ IamBOOTSTRAP=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid) # Contains
|
|||
|
||||
|
||||
################## 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' && ~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | shuf) );
|
||||
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 | head -n 1) );
|
||||
do
|
||||
##### BOOTSTRAP AUTO LIKE BACK (NOT liking Myself)
|
||||
if [[ "$IamBOOTSTRAP" == "$G1PUB" ]]; then
|
||||
|
|
Loading…
Reference in New Issue