LOCKING TW
This commit is contained in:
parent
0f85b3110f
commit
32d8275153
6
12345.sh
6
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'
|
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=$(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
|
[[ ! $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
|
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
|
sed -i "s~_SECRET_~${myIP}~g" ~/.zen/tmp/${IPFSNODEID}/${MOATS}.astroindex.html
|
||||||
echo "HTTP/1.1 200 OK
|
echo "HTTP/1.1 200 OK
|
||||||
Server: Astroport
|
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 &
|
cat ~/.zen/tmp/${IPFSNODEID}/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# REDIRECTING TO TODAY GATEWAY
|
# ACTIVE GATEWAY
|
||||||
[[ $OLDIP != $myIP ]] && TWIP=$OLDIP
|
[[ $OLDIP != $myIP ]] && TWIP=$OLDIP
|
||||||
echo "*********** OFFICIAL LOGIN GOES TO $TWIP"
|
echo "*********** OFFICIAL LOGIN GOES TO $TWIP"
|
||||||
else
|
else
|
||||||
|
|
|
@ -88,6 +88,10 @@ for PLAYER in $(ls ~/.zen/game/players/); do
|
||||||
$MY_PATH/VOEUX.refresh.sh ~/.zen/tmp/astro/index.html $PLAYER
|
$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 ?
|
## ANY CHANGES ?
|
||||||
##############################################################
|
##############################################################
|
||||||
DIFF=$(diff ~/.zen/tmp/astro/index.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html)
|
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
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
##############################################################
|
##############################################################
|
||||||
## TODO : Make it G1Voeu with program contained in a tiddler using G1AstroBot ;)
|
## TODO : Make it G1Voeu with program contained in a tiddler using G1AstroBot ;)
|
||||||
## REFRESH G1BARRE for ALL G1VOEUX in PLAYER TW
|
## REFRESH G1BARRE for ALL G1VOEUX in PLAYER TW
|
||||||
|
|
Loading…
Reference in New Issue