controle du bootstrap au démarrage... à améliorer...

This commit is contained in:
fred 2022-04-16 01:04:51 +02:00
parent a6d2fa25e2
commit 979294898a
4 changed files with 21 additions and 7 deletions

5
A_boostrap_public.txt Normal file
View File

@ -0,0 +1,5 @@
/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN
/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa
/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt
/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ

View File

@ -90,11 +90,18 @@ fi
## CHECK IF ASTROPORT/CRON/IPFS IS RUNNING ## CHECK IF ASTROPORT/CRON/IPFS IS RUNNING
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
[[ ! $YOU ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS OFF" --text="Activer Astroport ?" --entry-text="OUI" NON) && [[ $RUN == "" || $RUN == "NON" ]] && exit 1 [[ ! $YOU ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS OFF" --text="Activer Astroport ?" --entry-text="OUI" NON) && [[ $RUN == "" || $RUN == "NON" ]] && exit 1
[[ $YOU && ! $1 ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS ON" --text="Désactiver Astroport ?" --entry-text="OUI" NON) [[ $YOU && ! $1 ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS ON" --text="Désactiver Astroport ? Non, vous voulez ajouter un Media?" --entry-text="OUI" NON)
## DES/ACTIVATION ASTROPORT ## DES/ACTIVATION ASTROPORT
[[ $RUN == "OUI" ]] && REP=$(~/.zen/astrXbian/zen/cron_VRFY.sh) && zenity --warning --width 600 --text "$REP" if [[ $RUN == "OUI" ]]; then
STRAP=$(ipfs bootstrap)
BOOT=$(zenity --entry --width 300 --title="Catégorie" --text="$STRAP Changez de Bootstrap" --entry-text="Aucun" astrXbian Public)
[[ $BOOT == "Aucun" ]] && ipfs bootstrap rm --all
[[ $BOOT == "astrXbian" ]] && for bootnode in $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#"); do ipfs bootstrap add $bootnode; done
[[ $BOOT == "Public" ]] && for bootnode in $(cat ~/.zen/astrXbian/A_boostrap_public.txt | grep -Ev "#"); do ipfs bootstrap add $bootnode; done
REP=$(~/.zen/astrXbian/zen/cron_VRFY.sh) && zenity --warning --width 600 --text "$REP"
fi
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
[[ $YOU == "" ]] && exit 1 [[ $YOU == "" ]] && echo "IPFS not running" && exit 1
######################################################################## ########################################################################
# CHOOSE CATEGORY (remove anime, not working!) # CHOOSE CATEGORY (remove anime, not working!)

View File

@ -185,12 +185,14 @@ fi
if [[ $(($minute % 30)) == 0 ]]; then if [[ $(($minute % 30)) == 0 ]]; then
########## NextCloud.SMS GUILDE STATION ############## ########## NextCloud.SMS GUILDE STATION ##############
if [[ -e ~/.zen/SMS/ ]];then if [[ -e /home/${YOU}/.zen/SMS/ ]];then
# DONE at 20h01 in taurus crontab # DONE at 20h01 in taurus crontab
# [[ "$timebar" == "18:30" ]] && /home/${YOU}/.zen/SMSAPP/sms/_SEND2GUILDE.sh "BIODYN" ## PREPARE BIODYN GUILDE SMS => 20h30 in France # [[ "$timebar" == "18:30" ]] && /home/${YOU}/.zen/SMSAPP/sms/_SEND2GUILDE.sh "BIODYN" ## PREPARE BIODYN GUILDE SMS => 20h30 in France
/home/${YOU}/.zen/SMSAPP/sms_send_tosend.sh /home/${YOU}/.zen/SMSAPP/sms_send_tosend.sh
fi fi
########## SMS GUILDE STATION ############## ########## BUNKERBOX STATION ##############
# [[ $(cat /home/${YOU}/.zen/bunkerbox/qo-op 2>/dev/null) != "" && $(cat /home/${YOU}/.zen/bunkerbox/choice 2>/dev/null) == "qo-op" ]] && /home/${YOU}/workspace/bunkerbox/crowdbunker.sh &
fi fi
# __ __ _____ ____ # __ __ _____ ____

View File

@ -315,8 +315,8 @@ IPNSLINK=$(ipfs key list -l | grep ${MEDIAKEY} | cut -d ' ' -f 1)
| sed "s/\${XZUID}/$XZUID/g" \ | sed "s/\${XZUID}/$XZUID/g" \
| sed "s/\${G1PUB}/$G1PUB/g" \ | sed "s/\${G1PUB}/$G1PUB/g" \
| sed "s/\${TITLE}/$TITLE/g" \ | sed "s/\${TITLE}/$TITLE/g" \
> ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/index.html > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIA
KEY}/index.html
## SECOND REDIRECT PAGE ${MEDIAKEY}/${G1PUB}/index.html ## SECOND REDIRECT PAGE ${MEDIAKEY}/${G1PUB}/index.html
# https://tube.copylaradio.com/ipns/$IPNSLINK/${G1PUB}/ # https://tube.copylaradio.com/ipns/$IPNSLINK/${G1PUB}/