diff --git a/12345.sh b/12345.sh index 047f478b..fb6bfa98 100755 --- a/12345.sh +++ b/12345.sh @@ -283,9 +283,9 @@ cat ~/.zen/tmp/${IPFSNODEID}/${MOATS}.messaging.json >> ~/.zen/tmp/${IPFSNODEID} tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/${MOATS}.astroindex.html --output ~/.zen/tmp --render '.' 'miz.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion' OLDIP=$(cat ~/.zen/tmp/miz.json | jq -r .[].secret) [[ ! $OLDIP ]] && (echo "501 ERROR - SORRY - YOUR TW IS OUT OF SWARM#0 - CONTINUE " | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && continue - # LOCKED TW BECOMING NEW GATEWAY + # LOCKED TW BECOMING ACTIVE GATEWAY if [[ $OLDIP == "_SECRET_" ]]; then - echo "_SECRET_ TW PUSHING TW" ## BECOMING OFFICIAL SEND NEW TW + echo "_SECRET_ TW PUSHING TW" ## BECOMING OFFICIAL BECOME R/W TW sed -i "s~_SECRET_~${myIP}~g" ~/.zen/tmp/${IPFSNODEID}/${MOATS}.astroindex.html echo "HTTP/1.1 200 OK Server: Astroport @@ -295,7 +295,7 @@ Content-Type: text/html; charset=UTF-8 cat ~/.zen/tmp/${IPFSNODEID}/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & continue fi - # REDIRECTING TO TODAY GATEWAY + # ACTIVE GATEWAY [[ $OLDIP != $myIP ]] && TWIP=$OLDIP echo "*********** OFFICIAL LOGIN GOES TO $TWIP" else diff --git a/ASTROBOT/PLAYER.refresh.sh b/ASTROBOT/PLAYER.refresh.sh index 69ead34e..d0889f52 100755 --- a/ASTROBOT/PLAYER.refresh.sh +++ b/ASTROBOT/PLAYER.refresh.sh @@ -88,6 +88,10 @@ for PLAYER in $(ls ~/.zen/game/players/); do $MY_PATH/VOEUX.refresh.sh ~/.zen/tmp/astro/index.html $PLAYER ############################################################## + #################### + # LOCKING TW : myIP becomes _SECRET_ + sed -i "s~${myIP}~_SECRET_~g" ~/.zen/tmp/astro/index.html + ## ANY CHANGES ? ############################################################## DIFF=$(diff ~/.zen/tmp/astro/index.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html) @@ -102,7 +106,7 @@ for PLAYER in $(ls ~/.zen/game/players/); do fi - # +# ############################################################## ## TODO : Make it G1Voeu with program contained in a tiddler using G1AstroBot ;) ## REFRESH G1BARRE for ALL G1VOEUX in PLAYER TW