check connectivity with bootstrap before initialisation - and extend like connectivity

This commit is contained in:
qo-op 2021-05-18 15:05:31 +02:00
parent 2287f94a29
commit a7e76a81dc
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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