Player / Captain / Station
This commit is contained in:
parent
d45c75fde9
commit
bb67e9e0c5
|
@ -21,11 +21,11 @@
|
|||
<div class="row">
|
||||
|
||||
<div class="column">
|
||||
<iframe src="http://127.0.0.1:8080/ipns/_MOANS_" id="iframe1" style="height:100%;width:100%;border:none;overflow:hidden;"></iframe>
|
||||
<iframe src="http://127.0.0.1:8080/ipfs/bafybeierau6ef7hja2x6hl5xhkuvof3j6gm2mj56amisgn6ryjx6qozzge" id="iframe1" style="height:100%;width:100%;border:none;overflow:hidden;"></iframe>
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<iframe src="http://127.0.0.1:8080/ipns/_QOOPNS_" id="iframe2" style="height:100%;width:100%;border:none;overflow:hidden;"></iframe>
|
||||
<iframe src="http://127.0.0.1:8080/ipfs/bafybeidrf7j5muokvoafauf3q4ek72fmz3mvqf3k4rdohxpextnbh3dw6u" id="iframe2" style="height:100%;width:100%;border:none;overflow:hidden;"></iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
#!/bin/bash
|
||||
################################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 0.1
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
################################################################################
|
||||
# INTERFACE DE GESTION DE JOURNAUX DES PLAYERS
|
||||
# Le Journal du CAPTAIN est désormais le journal de bord de cet Astroport
|
||||
|
||||
# Sa tâche sera de faire le tour des nouveaux rêves pour les ajouter à son journal désormais publié comme balise de la station astrXbian
|
||||
# Alerter de manque de placement sur certains ou sur les primes de maintenance.
|
||||
|
||||
# ~/.zen/game/players/$PLAYER/ipfs/
|
||||
# ~/.zen/ipfs/.$IPFSNODEID
|
||||
################################################################################
|
||||
################################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
|
||||
# Check who is currently current connected PLAYER
|
||||
PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
|
||||
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
||||
source ~/.zen/ipfs.sync
|
||||
|
||||
if [[ $IPFS_SYNC_DIR == "$PLAYER" ]]; then
|
||||
echo "Bienvenue capitaine $PLAYER !"; sleep 2
|
||||
echo "$PSEUDO ouverture du journal de votre Astroport (rassemblez les Good News des journaux Moa) ?"
|
||||
# Récupération de la clef du capitaine PLAYER ( identique à celle du démon IPFS )
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[ $? == 0 ] && xdg-open "http://127.0.0.1:8080/ipns/$IPFSNODEID"
|
||||
|
||||
# Ouverture des Moa de tous les PLAYERs
|
||||
for play in $(ls ~/.zen/game/players); do
|
||||
moaplayer=$(ipfs key list -l | grep -w moa_$play | cut -d ' ' -f 1)
|
||||
g1pub=$(cat ~/.zen/game/players/$play/ipfs/.12D*/G1SSB/_g1.pubkey)
|
||||
|
||||
# TODO USE INTERNAL TIDDLYWIKI TIMESTAMP TO SHOW MODIFIED FIRST
|
||||
# Check if different from last record (check .chain)
|
||||
# nowchain=$(ipfs cat /ipns/$moaplayer/chain 2>/dev/null)
|
||||
# moachain=$(cat ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$g1pub/chain.moa 2>/dev/null)
|
||||
|
||||
# [[ $nowchain != $moachain ]] && xdg-open "http://127.0.0.1:8080/ipns/$moaplayer"
|
||||
# TODO Save actual moachain from a command received through Instscan/nc trick for exemple, or recurrent astrXbian actions...
|
||||
# ipfs cat /ipns/$moaplayer/chain > ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$g1pub/chain.moa
|
||||
done
|
||||
|
||||
zenity --question --width 300 --text "$PLAYER souhaitez-vous ouvrir votre journal 'secret' (niveau 5) ?"
|
||||
# Récupération de la clef du capitaine PLAYER ( identique à celle du démon IPFS )
|
||||
player=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f 1)
|
||||
[ $? == 0 ] && xdg-open "http://127.0.0.1:8080/ipns/$player"
|
||||
|
||||
fi
|
||||
|
||||
# NOT CAPTAIN
|
||||
zenity --question --width 300 --text "$PSEUDO souhaitez-vous ouvrir votre journal 'Moa' (niveau 3) ?"
|
||||
# Récupération de la clef du capitaine PLAYER ( identique à celle du démon IPFS )
|
||||
moa=$(ipfs key list -l | grep -w moa_$PLAYER | cut -d ' ' -f 1)
|
||||
[ $? == 0 ] && xdg-open "http://127.0.0.1:8080/ipns/$moa"
|
||||
|
||||
zenity --question --width 300 --text "$PSEUDO souhaitez-vous ouvrir votre journal 'qo-op' (niveau 0) ?"
|
||||
# Récupération de la clef du capitaine PLAYER ( identique à celle du démon IPFS )
|
||||
qoop=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f 1)
|
||||
[ $? == 0 ] && xdg-open "http://127.0.0.1:8080/ipns/$qoop"
|
||||
|
||||
# TODO: fabriquer une interface où passer d'un journal à l'autre, y glisser déposer, etc ...
|
||||
# Le journal transmit par la balise IPFS est celui de la clef PLAYER du CAPTAIN.
|
||||
# Ce journal ne se remplit pour un joueur que lorsqu'il devient CAPTAIN (y compris pour le canal secret).
|
||||
#
|
||||
# Le journal Moa = NFT où nous repertorions nos exploits et talents
|
||||
# Le journal qo-op fait partie de la diffusion incensurable des bunkerbox (evolutions Youtube/Facebook/etc... ici on se branche au vieux web)
|
||||
|
||||
exit 0
|
|
@ -4,12 +4,12 @@
|
|||
# Version: 0.1
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
################################################################################
|
||||
# Gestion de l'identité IPFS de la Station parmis celle des PLAYER
|
||||
# La première clef n'a aucun chalenge pour le faire.
|
||||
# Les suivantes peuvent être soumises au niveau de confiance (LOVE) des meilleurs Astronautes.
|
||||
# Gestion de l'entrée du PLAYER dans la Station
|
||||
# Le premier devient Capitaine...
|
||||
# Les suivants selon le niveau de confiance (LOVE) des meilleurs Astronautes?!
|
||||
#
|
||||
# ~/.zen/game/players/$PLAYER/ipfs/
|
||||
# ~/.zen/ipfs/.$IPFSNODEID
|
||||
# 'player' 'moa'
|
||||
# ~/.zen/ipfs/ -> ~/.zen/game/players/$PLAYER/ipfs/
|
||||
################################################################################
|
||||
################################################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
|
@ -28,69 +28,103 @@ source ~/.zen/ipfs.sync
|
|||
|
||||
### AN ASTROPORT NEEDS A CAPTAIN
|
||||
##############################
|
||||
if [[ $IPFS_SYNC_DIR == "" || $IPFS_SYNC_DIR == "$HOME/astroport" ]]; then
|
||||
|
||||
if [[ ! -d $IPFS_SYNC_DIR || $IPFS_SYNC_DIR == "" || $IPFS_SYNC_DIR == "$HOME/astroport" ]]; then
|
||||
echo "#-----------------------------------"
|
||||
echo $IPFS_SYNC_DIR
|
||||
echo "Aucun Capitaine à bord."; sleep 1
|
||||
echo "$PLAYER vous devenez la clef maitre de la Station et de sa balise astrXbian..."; sleep 1
|
||||
|
||||
echo
|
||||
echo "** Stop or Kill ipfs daemon **"
|
||||
# 1st Captain. Changing IPFS station key.
|
||||
sudo service ipfs stop
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
[[ $YOU ]] && sudo killall -5 ipfs
|
||||
#-----------------------------------
|
||||
|
||||
echo "Replace ~/.ipfs/config"
|
||||
read
|
||||
[[ -f ~/.ipfs/config.astrXbian ]] && mv ~/.ipfs/config.astrXbian ~/.ipfs/config.astrXbian.${MOATS} && echo "BACKUP config.astrXbian.${MOATS}"
|
||||
mv ~/.ipfs/config ~/.ipfs/config.astrXbian && echo "BACKUP current ipfs config"
|
||||
cp ~/.zen/game/players/$PLAYER/ipfs.config ~/.ipfs/config && echo "Install $PLAYER G1 ipfs config"
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
echo
|
||||
echo "=== Replacing ~/.ipfs/config ==="; sleep 2
|
||||
|
||||
echo "Link keystore to captain"
|
||||
read
|
||||
mv ~/.ipfs/keystore ~/.ipfs/keystore.astrXbian
|
||||
[[ -f ~/.ipfs/config.astrXbian ]] && mv ~/.ipfs/config.astrXbian ~/.ipfs/config.astrXbian.${MOATS} && echo "BACKUP config.astrXbian.${MOATS}"; sleep 2
|
||||
mv ~/.ipfs/config ~/.ipfs/config.astrXbian && echo "BACKUP current ipfs config"; sleep 2
|
||||
cp ~/.zen/game/players/$PLAYER/ipfs.config ~/.ipfs/config && echo "Installing $PLAYER 'G1' ipfs config"
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID); echo $IPFSNODEID
|
||||
|
||||
echo
|
||||
echo "==== qo-op & moa Captain/Station keystore ===="; sleep 2
|
||||
|
||||
mv ~/.ipfs/keystore ~/.ipfs/keystore.astrXbian.${LAYER}.${MOATS}
|
||||
ln -s ~/.zen/game/players/$PLAYER/keystore ~/.ipfs/keystore
|
||||
|
||||
echo "Keep 'qo-op' existing key, or create first one"
|
||||
read
|
||||
cp ~/.ipfs/keystore.astrXbian/key_ofxs233q ~/.ipfs/keystore/ 2>/dev/null
|
||||
publishkey=$(ipfs key gen qo-op 2>/dev/null)
|
||||
publishkey=$(ipfs key list -l | grep -w qo-op | cut -d ' ' -f 1)
|
||||
# Get already created keys
|
||||
cp ~/.ipfs/keystore.astrXbian.${LAYER}.${MOATS}/* ~/.ipfs/keystore/ 2>/dev/null
|
||||
|
||||
echo "Station 'qo-op' channel : /ipns/$publishkey"; sleep 1
|
||||
# 'qo-op' Key there?
|
||||
[[ ! -f ~/.ipfs/keystore/key_ofxs233q ]] && qoopns=$(ipfs key gen qo-op)
|
||||
ipfs key list -l | grep -w qo-op
|
||||
qoopns=$(ipfs key list -l | grep -w qo-op | cut -d ' ' - f 1)
|
||||
|
||||
echo "Connect captain ipfs data ?!"
|
||||
read
|
||||
[[ -d ~/.zen/ipfs.astrXbian ]] && mv ~/.zen/ipfs.astrXbian ~/.zen/ipfs.astrXbian.${MOATS} && echo "BACKUP ~/.zen/ipfs.astrXbian.${MOATS}"
|
||||
mv ~/.zen/ipfs ~/.zen/ipfs.astrXbian && echo "BACKUP current ~/.zen/ipfs"
|
||||
ln -s ~/.zen/game/players/$PLAYER/ipfs ~/.zen/ipfs && echo "$PLAYER control 'self' and 'qo-op' channels"
|
||||
echo "----> Station 'qo-op' channel : /ipns/$qoopns"; sleep 1
|
||||
|
||||
echo "## Start IPFS DAEMON"
|
||||
# 'moa' Key there?
|
||||
[[ ! -f ~/.ipfs/keystore/key_nvxwc ]] && moans=$(ipfs key gen moa)
|
||||
ipfs key list -l | grep -w moa
|
||||
moans=$(ipfs key list -l | grep -w moa | cut -d ' ' - f 1)
|
||||
|
||||
echo "----> Station 'moa' channel : /ipns/$moans"; sleep 1
|
||||
|
||||
echo
|
||||
echo "===== Connect captain IPFS datadir to Station (balise junction) ====="; sleep 2
|
||||
|
||||
[[ -d ~/.zen/ipfs.astrXbian ]] && mv ~/.zen/ipfs.astrXbian ~/.zen/ipfs.astrXbian.${MOATS} && echo "BACKUP ~/.zen/ipfs.astrXbian.${MOATS}"; sleep 2
|
||||
mv ~/.zen/ipfs ~/.zen/ipfs.astrXbian && echo "BACKUP current ~/.zen/ipfs"; sleep 2
|
||||
ln -s ~/.zen/game/players/$PLAYER/ipfs ~/.zen/ipfs && echo "$PLAYER become 'self' and now control 'moa' & 'qo-op' channels"
|
||||
echo
|
||||
echo "** Restart IPFS DAEMON **"
|
||||
sudo service ipfs start
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
[[ ! $YOU ]] && ipfs daemon --writable &
|
||||
#-----------------------------------
|
||||
echo "#-----------------------------------"
|
||||
|
||||
echo "Nouvelle Identité balise IPFS"; sleep 1
|
||||
ipfs id
|
||||
echo "##################################################### OK"
|
||||
echo "Nouvelle Identité 'self' Balise IPFS"; sleep 1
|
||||
ipfs id -f='<id>\n'
|
||||
echo "##################################################### OK"
|
||||
echo "IPFS_SYNC_DIR=$PLAYER" > ~/.zen/ipfs.sync ## PLAYER IS ASTROPORT CAPTAIN NOW
|
||||
|
||||
else
|
||||
##############################
|
||||
|
||||
# Adapting ipfs daemon keystore with player keys
|
||||
mv ~/.ipfs/keystore ~/.ipfs/keystore.astrXbian.${LAYER}.${MOATS}
|
||||
ln -s ~/.zen/game/players/$PLAYER/keystore ~/.ipfs/keystore
|
||||
|
||||
if [[ $IPFS_SYNC_DIR == "$PLAYER" ]]; then
|
||||
## THE CAPTAIN IS LOGGED IN
|
||||
echo "Bienvenue capitaine !"; sleep 2
|
||||
echo "Ouverture des journaux...";
|
||||
echo "Bienvenue CAPITAINE !"; sleep 2
|
||||
echo "Ouverture des journaux 'moa' et 'qo-op' de votre Station Astroport";
|
||||
|
||||
# OPEN 'moa' channel
|
||||
moans=$(ipfs key list -l | grep -w moa | cut -d ' ' -f 1)
|
||||
xdg-open "http://127.0.0.1:8080/ipns/$moans"
|
||||
|
||||
# OPEN 'qo-op' channel
|
||||
qoopns=$(ipfs key list -l | grep -w qo-op | cut -d ' ' -f 1)
|
||||
xdg-open "http://127.0.0.1:8080/ipns/$qoopns"
|
||||
|
||||
else
|
||||
# A PLAYER IS LOGGED IN
|
||||
echo "Joueur $PLAYER, $IPFS_SYNC_DIR est le capitaine de cet Astroport"; sleep 1
|
||||
echo "$PSEUDO, documentez vos 'rêves' et 'plans' dans votre journal 'moa' et donnez 3 étoiles au capitaine."; sleep 1
|
||||
# ASTRONAUT PLAYER IS LOGGED IN
|
||||
echo "Joueur $PLAYER, $IPFS_SYNC_DIR est Capitaine de cet Astroport"; sleep 1
|
||||
echo "$PSEUDO, Décrivez vos 'Talents', soumettez vos 'Rêves' pour améliorer cet Astroport dans votre journal 'moa'."; sleep 2
|
||||
echo "Publiez dans votre journal public 'qo-op'"; sleep 2
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
${MY_PATH}/JOURNAL.visit.sh # OPEN TIDDLYWIKIS
|
||||
# OPEN PLAYER HOME
|
||||
player=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f 1)
|
||||
xdg-open "http://127.0.0.1:8080/ipns/$player"
|
||||
|
||||
|
||||
[[ $1 != "quiet" ]] && echo "=============================================
|
||||
|
|
|
@ -110,52 +110,46 @@ else
|
|||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) # We should have a Captain already...
|
||||
|
||||
# PLAYER WIKI
|
||||
STATION=$(ipfs key list -l | grep self | cut -d ' ' -f 1)
|
||||
cp ${MY_PATH}/../templates/playerwiki.html ~/.zen/game/players/$PLAYER/
|
||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~_PSEUDO_~${PSEUDO}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~_MOAID_~${PLAYERNS}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~_QOOP_~${STATION}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~_MOAKEY_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${PLAYERNS}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||
# PLAYER Home ~/.zen/game/players/$PLAYER/index.html
|
||||
cp ${MY_PATH}/../templates/playerhome.html ~/.zen/game/players/$PLAYER/index.html
|
||||
sed -i "s~_MOANS_~${MOANS}~g" ~/.zen/game/players/$PLAYER/index.html
|
||||
sed -i "s~_QOOPNS_~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/index.html
|
||||
|
||||
#echo "## PUBLISHING ${PLAYER} /ipns/$PLAYERNS"
|
||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/playerwiki.html | tail -n 1)
|
||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/index.html | tail -n 1)
|
||||
ipfs name publish --key=${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||
|
||||
# Moa WIKI - Share the 'qo-op' key
|
||||
STATION=$(ipfs key list -l | grep -w moa | cut -d ' ' -f 1)
|
||||
cp ${MY_PATH}/../templates/moawiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
# Moa WIKI ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
mkdir -p ~/.zen/game/players/$PLAYER/moa
|
||||
cp ${MY_PATH}/../templates/moawiki.html ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~_MOAID_~${MOANS}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
STATION=$(ipfs key list -l | grep -w 'moa' | cut -d ' ' -f 1)
|
||||
sed -i "s~_QOOP_~${STATION}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~_MOAKEY_~moa_${PLAYER}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${MOANS}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/game/players/$PLAYER/moa/index.html
|
||||
|
||||
#echo "## PUBLISHING moa_${PLAYER} /ipns/$MOANS"
|
||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/moa/index.html | tail -n 1)
|
||||
ipfs name publish --key=moa_${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||
|
||||
# qo-op WIKI ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
cp ${MY_PATH}/../templates/qoopwiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_MOAID_~${MOANS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_MOAID_~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
STATION=$(ipfs key list -l | grep -w 'qo-op' | cut -d ' ' -f 1)
|
||||
sed -i "s~_QOOP_~${STATION}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_MOAKEY_~moa_${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${MOANS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_MOAKEY_~qo-op_${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||
|
||||
#echo "## PUBLISHING moa_${PLAYER} /ipns/$MOANS"
|
||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html | tail -n 1)
|
||||
ipfs name publish --key=moa_${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||
|
||||
# qo-op WIKI
|
||||
STATION=$(ipfs key list -l | grep -w qo-op | cut -d ' ' -f 1)
|
||||
cp ${MY_PATH}/../templates/qoopwiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~_MOAID_~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~_QOOP_~${STATION}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~_MOAKEY_~qo-op_${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||
|
||||
#echo "## PUBLISHING qo-op_${PLAYER} /ipns/$QOOPNS"
|
||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html | tail -n 1)
|
||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html | tail -n 1)
|
||||
ipfs name publish --key=qo-op_${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||
|
||||
|
||||
|
@ -170,13 +164,13 @@ fi
|
|||
qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.PLAYERNS.png" "$PLAYERNS"
|
||||
qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.MOANS.png" "$MOANS"
|
||||
qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.QOOPNS.png" "$QOOPNS"
|
||||
|
||||
echo; echo "Création de vos QR codes IPNS, clefs de votre réseau IPFS."; sleep 1
|
||||
|
||||
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Espace Astronaute Activé : ~/.zen/game/players/$PLAYER/"; sleep 1
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Votre Journal Personnel (niveau 5) : $PLAYER"; echo "http://127.0.0.1:8080/ipns/$PLAYERNS/playerwiki.html"; sleep 2
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Votre Journal Astronaute (niveau 3) : moa_$PLAYER"; echo " http://127.0.0.1:8080/ipns/$MOANS/moawiki.html"; sleep 2
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Votre Journal Passerelle (niveau 0/1) : qo-op_$PLAYER"; echo " http://127.0.0.1:8080/ipns/$QOOPNS/qoopwiki.html"; sleep 2
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Votre Journal Personnel (niveau 5) : $PLAYER"; echo "http://127.0.0.1:8080/ipns/$PLAYERNS"; sleep 2
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Votre Journal Astronaute (niveau 3) : moa_$PLAYER"; echo " http://127.0.0.1:8080/ipns/$(ipfs key list -l | grep -w moa_$PLAYER | cut -d ' ' -f 1)"; sleep 2
|
||||
[[ $1 != "quiet" ]] && echo; echo "*** Votre Journal Passerelle (niveau 0/1) : qo-op_$PLAYER"; echo " http://127.0.0.1:8080/ipns/$(ipfs key list -l | grep -w qo-op_$PLAYER | cut -d ' ' -f 1)"; sleep 2
|
||||
|
||||
# PASS CRYPTING KEY
|
||||
openssl enc -aes-256-cbc -salt -in "$HOME/.zen/game/players/$PLAYER/secret.june" -out "$HOME/.zen/game/players/$PLAYER/enc.secret.june" -k $PASS 2>/dev/null
|
||||
|
|
Loading…
Reference in New Issue