please check official with _SECRET_
This commit is contained in:
parent
a6b8a22648
commit
33ead68dd3
30
12345.sh
30
12345.sh
|
@ -288,17 +288,27 @@ cat ~/.zen/game/players/toctoc/${MOATS}.messaging.json >> ~/.zen/game/players/to
|
||||||
if [[ $OLDIP == "_SECRET_" ]]; then
|
if [[ $OLDIP == "_SECRET_" ]]; then
|
||||||
echo "_SECRET_ TW PUSHING TW" ## BECOMING OFFICIAL BECOME R/W TW
|
echo "_SECRET_ TW PUSHING TW" ## BECOMING OFFICIAL BECOME R/W TW
|
||||||
sed -i "s~_SECRET_~${myIP}~g" ~/.zen/game/players/toctoc/${MOATS}.astroindex.html
|
sed -i "s~_SECRET_~${myIP}~g" ~/.zen/game/players/toctoc/${MOATS}.astroindex.html
|
||||||
echo "HTTP/1.1 200 OK
|
|
||||||
Server: Astroport
|
|
||||||
Content-Type: text/html; charset=UTF-8
|
|
||||||
" > ~/.zen/game/players/toctoc/${MOATS}.index.redirect
|
|
||||||
cat ~/.zen/game/players/toctoc/${MOATS}.astroindex.html >> ~/.zen/game/players/toctoc/${MOATS}.index.redirect
|
|
||||||
cat ~/.zen/game/players/toctoc/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
|
||||||
|
|
||||||
## CREATE $PLAYER IPNS KEY (for next 20h12)
|
# cat ~/.zen/game/players/toctoc/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
||||||
ipfs key import ${PLAYER} -f pem-pkcs8-cleartext ~/.zen/game/players/toctoc/${MOATS}.${G1PUB}.ipns.key
|
|
||||||
mkdir -p ~/.zen/game/players/$PLAYER/ipfs/moa
|
## CREATE $PLAYER IPNS KEY (for next 20h12)
|
||||||
cp ~/.zen/game/players/toctoc/${MOATS}.astroindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
ipfs key import ${PLAYER} -f pem-pkcs8-cleartext ~/.zen/game/players/toctoc/${MOATS}.${G1PUB}.ipns.key
|
||||||
|
[[ ! -d ~/.zen/game/players/$PLAYER/ipfs/moa ]] && \
|
||||||
|
mv ~/.zen/game/players/toctoc ~/.zen/game/players/$PLAYER
|
||||||
|
mkdir -p ~/.zen/game/players/$PLAYER/ipfs/moa/
|
||||||
|
mv ~/.zen/game/players/$PLAYER/${MOATS}.astroindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
|
|
||||||
|
echo "## PUBLISHING ${PLAYER} /ipns/$ASTRONAUTENS/"
|
||||||
|
IPUSH=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ipfs/moa/index.html | tail -n 1)
|
||||||
|
echo $IPUSH > ~/.zen/game/players/$PLAYER/ipfs/moa/.chain # Contains last IPFS backup PLAYER KEY
|
||||||
|
echo "/ipfs/$IPUSH"
|
||||||
|
echo $MOATS > ~/.zen/game/players/$PLAYER/ipfs/moa/.moats
|
||||||
|
ipfs name publish --key=${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||||
|
## MEMORISE PLAYER Ŋ1 ZONE
|
||||||
|
echo "$PLAYER" > ~/.zen/game/players/$PLAYER/.player
|
||||||
|
echo "$PSEUDO" > ~/.zen/game/players/$PLAYER/.pseudo
|
||||||
|
echo "$G1PUB" > ~/.zen/game/players/$PLAYER/.g1pub
|
||||||
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# ACTIVE GATEWAY
|
# ACTIVE GATEWAY
|
||||||
|
|
Loading…
Reference in New Issue