TW dropped in cyberspace

This commit is contained in:
fred 2022-12-25 22:52:32 +01:00
parent 9c98f73ad4
commit a435dfedd2
2 changed files with 10 additions and 2 deletions

View File

@ -127,12 +127,17 @@ select fav in "${choices[@]}"; do
echo "ATTENTION ${PLAYER} SUPPRESSION DEFINITIVE !!"
echo "Enter to continue. Ctrl+C to stop"
read
echo "REPLACE $IPFSNODEID WITH _ASTROPORT_"
sed "s~${IPFSNODEID}~_ASTROPORT_~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html ~/.zen/tmp/$PLAYER.html
TW=$(ipfs add -Hq ~/.zen/tmp/$PLAYER.html | tail -n 1)
ipfs name publish --allow-offline --key=$PLAYER /ipfs/$TW
espeak "TW dropped in cyberspace..."
ipfs key rm ${PLAYER}; ipfs key rm ${PLAYER}_feed; ipfs key rm $G1PUB;
for voeu in $(ls ~/.zen/game/players/$PLAYER/voeux/ 2>/dev/null); do
ipfs key rm $voeu
[[ $voeu != "" ]] && rm -Rf ~/.zen/game/world/$voeu
done
echo "REMOVE GCHANGE PROFILE"
echo "REMOVING GCHANGE+ PROFILE"
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://data.gchange.fr erase
#~ echo "REMOVE CESIUM+"
#~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://g1.data.e-is.pro erase

View File

@ -78,11 +78,14 @@ if [[ $SALT != "" && PEPPER != "" ]]; then
IPNSTAIL=$(echo $ASTROPORT | rev | cut -f 1 -d '/' | rev)
echo "TW ASTROPORT GATEWAY : ${ASTROPORT}"
[[ $IPNSTAIL == "_ASTROPORT_" ]] \
&& echo "GET CYBERSPACE TW : TODO CONNECT TO DOCK"
[[ $IPNSTAIL == $IPFSNODEID ]] \
&& echo "UPDATING $PLAYER LOCAL CACHE ~/.zen/game/players/$PLAYER/ipfs/moa" \
&& mkdir -p ~/.zen/game/players/$PLAYER/ipfs/moa \
&& cp ~/.zen/tmp/${MOATS}/TW/index.html ~/.zen/game/players/$PLAYER/ipfs/moa/ \
|| echo "PLAYER on $ASTROPORT Station"
|| echo "PLAYER CONNECTED TO $ASTROPORT STATION"
fi