From c202b61517f583ef76703a3ee59672d28b90c066 Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 12 Sep 2022 14:58:08 +0200 Subject: [PATCH] ## ASTRONAUTE SIGNALING ## --- ASTROBOT/PLAYER.refresh.sh | 8 ++++++++ start.sh | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ASTROBOT/PLAYER.refresh.sh b/ASTROBOT/PLAYER.refresh.sh index 344df915..70517a53 100755 --- a/ASTROBOT/PLAYER.refresh.sh +++ b/ASTROBOT/PLAYER.refresh.sh @@ -139,6 +139,9 @@ for g1wish in $(ls ~/.zen/game/players/$PLAYER/voeux/); do done +############################ +## ASTRONAUTE SIGNALING ## +[[ ! $(grep -w "$ASTRONAUTENS" ~/.zen/game/astronautes.txt ) ]] && echo "$PSEUDO:$PLAYER:$ASTRONAUTENS" >> ~/.zen/game/astronautes.txt ############################ @@ -157,4 +160,9 @@ done done +## IPFSNODEID ROUTING +ROUTING=$(ipfs add -q ~/.zen/game/astronautes.txt) +echo "PUBLISHING IPFSNODEID / Astronaute List" +ipfs name publish /ipfs/$ROUTING + exit 0 diff --git a/start.sh b/start.sh index 58534cb1..1ae98c15 100755 --- a/start.sh +++ b/start.sh @@ -30,6 +30,7 @@ echo [[ ! $(which ipfs) ]] && echo "EXIT. Vous devez avoir installé ipfs CLI sur votre ordinateur" && echo "https://dist.ipfs.io/#go-ipfs" && exit 1 YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1); [[ ! $YOU ]] && echo "Lancez 'ipfs daemon' SVP" && exit 1 +IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) ## CREATE AND OR CONNECT USER PS3='Créez VISA ou connectez-vous à votre compte Astronaute ___ ' @@ -83,11 +84,19 @@ echo "Votre Pass Astroport.ONE : $(cat ~/.zen/game/players/.current/.pass 2>/de G1PUB=$(cat ~/.zen/tmp/${PLAYER}.dunikey | grep 'pub:' | cut -d ' ' -f 2) [ ! ${G1PUB} ] && echo "ERROR. MAUVAIS PASS. EXIT" && exit 1 -echo "Clef Publque Astronaute : "$G1PUB +echo "Clef Publque Astronaute : $G1PUB" echo "ENTREE ACCORDEE" echo ASTRONAUTENS=$(ipfs key list -l | grep -w "$PLAYER" | cut -d ' ' -f 1) +## IPFSNODEID SIGNALING ## +[[ ! $(grep -w "$ASTRONAUTENS" ~/.zen/game/astronautes.txt ) ]] && echo "$PSEUDO:$PLAYER:$ASTRONAUTENS" >> ~/.zen/game/astronautes.txt +ROUTING=$(ipfs add -q ~/.zen/game/astronautes.txt) +echo "PUBLISHING IPFSNODEID / Astronaute List" +ipfs name publish /ipfs/$ROUTING +###################### + + echo "$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null) TW/Moa" echo "http://127.0.0.1:8080/ipns/$ASTRONAUTENS" echo "Echangez vos 'Dessin de Moa' et reliez vous au réseau des Astroport !"