Browse Source

check connectivity with bootstrap before initialisation - and extend like connectivity

pull/32/head
qo-op 6 months ago
parent
commit
a7e76a81dc
  1. 4
      ISOconfig.sh
  2. 2
      zen/gchange_INIT.sh

4
ISOconfig.sh

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

2
zen/gchange_INIT.sh

@ -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…
Cancel
Save