réglages et connexions
This commit is contained in:
parent
37cf950e49
commit
199b08bba9
22
start.sh
22
start.sh
|
@ -35,7 +35,7 @@ ACTUAL PLAYERS
|
||||||
case $fav in
|
case $fav in
|
||||||
"NOUVEAU VISA")
|
"NOUVEAU VISA")
|
||||||
${MY_PATH}/tools/VISA.new.sh
|
${MY_PATH}/tools/VISA.new.sh
|
||||||
fav=$(cat ~/.zen/tmp/PSEUDO)
|
fav=$(cat ~/.zen/tmp/PSEUDO) && rm ~/.zen/tmp/PSEUDO
|
||||||
echo "Astronaute $fav bienvenue dans le jeu de terraformation forêt jardin MadeInZion"
|
echo "Astronaute $fav bienvenue dans le jeu de terraformation forêt jardin MadeInZion"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
@ -50,7 +50,7 @@ ACTUAL PLAYERS
|
||||||
done
|
done
|
||||||
|
|
||||||
PLAYER=$fav
|
PLAYER=$fav
|
||||||
echo "SVP entrez votre PASS $fav"
|
echo "SVP entrez votre PASS"
|
||||||
rm -f ~/.zen/game/players/.current
|
rm -f ~/.zen/game/players/.current
|
||||||
ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current
|
ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current
|
||||||
|
|
||||||
|
@ -59,9 +59,11 @@ echo "Saisissez votre PASS "
|
||||||
read PASS
|
read PASS
|
||||||
|
|
||||||
## DECODE CURRENT PLAYER CRYPTO
|
## DECODE CURRENT PLAYER CRYPTO
|
||||||
|
echo "_ssl_ DECODAGE _ssl_"
|
||||||
openssl enc -aes-256-cbc -d -in "$HOME/.zen/game/players/.current/enc.secret.dunikey" -out "$HOME/.zen/tmp/${PLAYER}.dunikey" -k $PASS 2>/dev/null
|
openssl enc -aes-256-cbc -d -in "$HOME/.zen/game/players/.current/enc.secret.dunikey" -out "$HOME/.zen/tmp/${PLAYER}.dunikey" -k $PASS 2>/dev/null
|
||||||
[ $? != 0 ] && echo "ERROR. MAUVAIS PASS. EXIT" && rm $HOME/.zen/tmp/${PLAYER}.dunikey && exit 1
|
[ $? != 0 ] && echo "ERROR. MAUVAIS PASS. EXIT" && rm $HOME/.zen/tmp/${PLAYER}.dunikey && exit 1
|
||||||
|
echo "____________________";
|
||||||
|
echo
|
||||||
PS3="$PLAYER choisissez une action à mener : "
|
PS3="$PLAYER choisissez une action à mener : "
|
||||||
choices=("WEBCAM" "JOURNAUX" "IMPRIMER VISA" "EXPORTER VISA" "SUPPRIMER VISA" "QUITTER")
|
choices=("WEBCAM" "JOURNAUX" "IMPRIMER VISA" "EXPORTER VISA" "SUPPRIMER VISA" "QUITTER")
|
||||||
select fav in "${choices[@]}"; do
|
select fav in "${choices[@]}"; do
|
||||||
|
@ -70,33 +72,43 @@ select fav in "${choices[@]}"; do
|
||||||
echo "IMPRESSION"
|
echo "IMPRESSION"
|
||||||
${MY_PATH}/tools/VISA.print.sh
|
${MY_PATH}/tools/VISA.print.sh
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"EXPORTER VISA")
|
"EXPORTER VISA")
|
||||||
echo "EXPORT"
|
echo "EXPORT. INSERT USB KEY"
|
||||||
ls ~/.zen/game/players/.current
|
ls ~/.zen/game/players/.current
|
||||||
|
echo "Enter to continue. Ctrl+C to stop"
|
||||||
|
read
|
||||||
|
echo "TODO... ${MY_PATH}/tools/SAVE.astronaut.sh"
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"SUPPRIMER VISA")
|
"SUPPRIMER VISA")
|
||||||
echo "SUPPRESSION"
|
echo "SUPPRESSION"
|
||||||
echo "Enter to continue. Ctrl+C to stop"
|
echo "Enter to continue. Ctrl+C to stop"
|
||||||
read
|
read
|
||||||
ipfs key rm $PLAYER
|
ipfs key rm $PLAYER; ipfs key rm qo-op_$PLAYER; ipfs key rm moa_$PLAYER;
|
||||||
rm -Rf ~/.zen/game/players/$PLAYER
|
rm -Rf ~/.zen/game/players/$PLAYER
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"WEBCAM")
|
"WEBCAM")
|
||||||
echo "VIDEOBLOG"
|
echo "VIDEOBLOG"
|
||||||
${MY_PATH}/tools/vlc_webcam.sh
|
${MY_PATH}/tools/vlc_webcam.sh
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"JOURNAUX")
|
"JOURNAUX")
|
||||||
${MY_PATH}/tools/PLAYER.entrance.sh
|
${MY_PATH}/tools/PLAYER.entrance.sh
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"QUITTER")
|
"QUITTER")
|
||||||
echo "CIAO" && exit 0
|
echo "CIAO" && exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"")
|
"")
|
||||||
echo "Mauvais choix."
|
echo "Mauvais choix."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -30,16 +30,17 @@ if [[ $IPFS_SYNC_DIR == "$PLAYER" ]]; then
|
||||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||||
[ $? == 0 ] && xdg-open "http://127.0.0.1:8080/ipns/$IPFSNODEID"
|
[ $? == 0 ] && xdg-open "http://127.0.0.1:8080/ipns/$IPFSNODEID"
|
||||||
|
|
||||||
# Ouverture des Moa de tous les PLAYER
|
# Ouverture des Moa de tous les PLAYERs
|
||||||
for play in $(ls ~/.zen/game/players); do
|
for play in $(ls ~/.zen/game/players); do
|
||||||
moaplayer=$(ipfs key list -l | grep -w moa_$play | cut -d ' ' -f 1)
|
moaplayer=$(ipfs key list -l | grep -w moa_$play | cut -d ' ' -f 1)
|
||||||
g1pub=$(cat ~/.zen/game/players/$play/_g1.pubkey)
|
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)
|
# Check if different from last record (check .chain)
|
||||||
nowchain=$(ipfs cat /ipns/$moaplayer/chain 2>/dev/null)
|
# nowchain=$(ipfs cat /ipns/$moaplayer/chain 2>/dev/null)
|
||||||
moachain=$(cat ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$g1pub/chain.moa 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"
|
# [[ $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...
|
# 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
|
# ipfs cat /ipns/$moaplayer/chain > ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$g1pub/chain.moa
|
||||||
done
|
done
|
||||||
|
|
|
@ -16,6 +16,9 @@ MY_PATH="`dirname \"$0\"`" # relative
|
||||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
ME="${0##*/}"
|
ME="${0##*/}"
|
||||||
|
|
||||||
|
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||||
|
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||||
|
|
||||||
# Check who is currently current connected PLAYER
|
# Check who is currently current connected PLAYER
|
||||||
PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
|
PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
|
||||||
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
||||||
|
@ -27,26 +30,46 @@ source ~/.zen/ipfs.sync
|
||||||
##############################
|
##############################
|
||||||
if [[ $IPFS_SYNC_DIR == "" || $IPFS_SYNC_DIR == "$HOME/astroport" ]]; then
|
if [[ $IPFS_SYNC_DIR == "" || $IPFS_SYNC_DIR == "$HOME/astroport" ]]; then
|
||||||
|
|
||||||
echo "Aucun pilote dans le cockpit."; sleep 1
|
echo "Aucun Capitaine à bord."; sleep 1
|
||||||
echo "$PLAYER séquence déplacement clef balise station..."; sleep 1
|
echo "$PLAYER vous devenez la clef maitre de la Station et de sa balise astrXbian..."; sleep 1
|
||||||
|
|
||||||
# astrXbian tranformation only once!
|
|
||||||
[[ -f ~/.ipfs/config.astrXbian ]] && echo "FATAL ERROR"; echo "File corruption detected. EXIT"; exit 1
|
|
||||||
|
|
||||||
# 1st Captain. Changing IPFS station key.
|
# 1st Captain. Changing IPFS station key.
|
||||||
sudo service ipfs stop
|
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
|
||||||
|
#-----------------------------------
|
||||||
|
|
||||||
# Replace ~/.ipfs
|
echo "Replace ~/.ipfs/config"
|
||||||
mv ~/.ipfs/config ~/.ipfs/config.astrXbian
|
read
|
||||||
cp ~/.zen/game/players/$PLAYER/ipfs.config ~/.ipfs/config
|
[[ -f ~/.ipfs/config.astrXbian ]] && mv ~/.ipfs/config.astrXbian ~/.ipfs/config.astrXbian.${MOATS} && echo "BACKUP config.astrXbian.${MOATS}"
|
||||||
## TODO CONTROL keystore to enhance security level
|
mv ~/.ipfs/config ~/.ipfs/config.astrXbian && echo "BACKUP current ipfs config"
|
||||||
## ajouter_video KEYS will be moved when captain is changing?
|
cp ~/.zen/game/players/$PLAYER/ipfs.config ~/.ipfs/config && echo "Install $PLAYER G1 ipfs config"
|
||||||
|
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||||
|
|
||||||
# Moving captain data into Balise Station
|
echo "Link keystore to captain"
|
||||||
mv ~/.zen/game/players/$PLAYER/ipfs/.* ~/.zen/ipfs/
|
read
|
||||||
|
mv ~/.ipfs/keystore ~/.ipfs/keystore.astrXbian
|
||||||
|
ln -s ~/.zen/game/players/$PLAYER/keystore ~/.ipfs/keystore
|
||||||
|
|
||||||
## Start IPFS DAEMON
|
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)
|
||||||
|
|
||||||
|
echo "Station 'qo-op' channel : /ipns/$publishkey"; sleep 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 "## Start IPFS DAEMON"
|
||||||
sudo service ipfs start
|
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 "Nouvelle Identité balise IPFS"; sleep 1
|
echo "Nouvelle Identité balise IPFS"; sleep 1
|
||||||
ipfs id
|
ipfs id
|
||||||
|
@ -61,13 +84,13 @@ else
|
||||||
|
|
||||||
else
|
else
|
||||||
# A PLAYER IS LOGGED IN
|
# A PLAYER IS LOGGED IN
|
||||||
echo "Joueur $PLAYER, $IPFS_SYNC_DIR est votre capitaine"; sleep 1
|
echo "Joueur $PLAYER, $IPFS_SYNC_DIR est le capitaine de cet Astroport"; sleep 1
|
||||||
echo "$PSEUDO, inscrivez dans votre 'Moa Journal' vos rêves et remarques à adresser au monde ou 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
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${MY_PATH}/tools/JOURNAL.visit.sh # OPEN TIDDLYWIKIS
|
${MY_PATH}/JOURNAL.visit.sh # OPEN TIDDLYWIKIS
|
||||||
|
|
||||||
|
|
||||||
[[ $1 != "quiet" ]] && echo "=============================================
|
[[ $1 != "quiet" ]] && echo "=============================================
|
||||||
|
|
|
@ -111,11 +111,12 @@ else
|
||||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) # We should have a Captain already...
|
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) # We should have a Captain already...
|
||||||
|
|
||||||
# PLAYER WIKI
|
# PLAYER WIKI
|
||||||
|
STATION=$(ipfs key list -l | grep self | cut -d ' ' -f 1)
|
||||||
cp ${MY_PATH}/../templates/playerwiki.html ~/.zen/game/players/$PLAYER/
|
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~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||||
sed -i "s~_PSEUDO_~${PSEUDO}~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~_MOAID_~${PLAYERNS}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||||
sed -i "s~_QOOP_~${QOOPNS}~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~_MOAKEY_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${PLAYERNS}~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~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/playerwiki.html
|
||||||
|
@ -125,34 +126,36 @@ else
|
||||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/playerwiki.html | tail -n 1)
|
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/playerwiki.html | tail -n 1)
|
||||||
ipfs name publish --key=${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
ipfs name publish --key=${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||||
|
|
||||||
# Moa WIKI
|
# Moa WIKI - Share the 'qo-op' key
|
||||||
cp ${MY_PATH}/../templates/moawiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
STATION=$(ipfs key list -l | grep -w moa | cut -d ' ' -f 1)
|
||||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
cp ${MY_PATH}/../templates/moawiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||||
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||||
sed -i "s~_MOAID_~${MOANS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||||
sed -i "s~_QOOP_~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
sed -i "s~_MOAID_~${MOANS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||||
sed -i "s~_MOAKEY_~moa_${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
sed -i "s~_QOOP_~${STATION}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${MOANS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html
|
sed -i "s~_MOAKEY_~moa_${PLAYER}~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/moawiki.html
|
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${MOANS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/index.html
|
||||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.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"
|
#echo "## PUBLISHING moa_${PLAYER} /ipns/$MOANS"
|
||||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/moawiki.html | tail -n 1)
|
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
|
ipfs name publish --key=moa_${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||||
|
|
||||||
# qo-op WIKI
|
# qo-op WIKI
|
||||||
cp ${MY_PATH}/../templates/qoopwiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html
|
STATION=$(ipfs key list -l | grep -w qo-op | cut -d ' ' -f 1)
|
||||||
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html
|
cp ${MY_PATH}/../templates/qoopwiki.html ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||||
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html
|
sed -i "s~_BIRTHDATE_~${MOATS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||||
sed -i "s~_MOAID_~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html
|
sed -i "s~_PSEUDO_~${PLAYER}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||||
sed -i "s~_QOOP_~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html
|
sed -i "s~_MOAID_~${QOOPNS}~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/qoopwiki.html
|
sed -i "s~_QOOP_~${STATION}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||||
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html
|
sed -i "s~_MOAKEY_~qo-op_${PLAYER}~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/qoopwiki.html
|
sed -i "s~k2k4r8opmmyeuee0xufn6txkxlf3qva4le2jlbw6da7zynhw46egxwp2~${QOOPNS}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html
|
||||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.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"
|
#echo "## PUBLISHING qo-op_${PLAYER} /ipns/$QOOPNS"
|
||||||
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/qoopwiki.html | tail -n 1)
|
IPUSH=$(ipfs add -wHq ~/.zen/game/players/$PLAYER/ipfs/.$PeerID/G1SSB/index.html | tail -n 1)
|
||||||
ipfs name publish --key=qo-op_${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
ipfs name publish --key=qo-op_${PLAYER} /ipfs/$IPUSH 2>/dev/null
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,24 +185,24 @@ openssl enc -aes-256-cbc -salt -in "$HOME/.zen/game/players/$PLAYER/$KEYFILE -ou
|
||||||
## TODO MORE SECURE ?! USE opengpg, natools, etc ...
|
## TODO MORE SECURE ?! USE opengpg, natools, etc ...
|
||||||
# ${MY_PATH}/natools.py encrypt -p $G1PUB -i ~/.zen/game/players/$PLAYER/secret.dunikey -o "$HOME/.zen/game/players/$PLAYER/secret.dunikey.oasis"
|
# ${MY_PATH}/natools.py encrypt -p $G1PUB -i ~/.zen/game/players/$PLAYER/secret.dunikey -o "$HOME/.zen/game/players/$PLAYER/secret.dunikey.oasis"
|
||||||
|
|
||||||
[[ $1 != "quiet" ]] && echo; echo "Sécurisation de vos clefs par chiffrage SSL... $PASS"; sleep 1
|
[[ $1 != "quiet" ]] && echo; echo "Sécurisation de vos clefs par chiffrage SSL... "; sleep 1
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
# !!!! # DEV MODE. REMOVE FOR PRODUCTION STATION FORGET PASS
|
# !! TODO !! # DEV MODE. REMOVE FOR PRODUCTION
|
||||||
echo "$PASS" > ~/.zen/game/players/$PLAYER/.pass
|
echo "$PASS" > ~/.zen/game/players/$PLAYER/.pass
|
||||||
|
[[ $1 != "quiet" ]] && echo "_____ REINIT COMMAND____"
|
||||||
|
[[ $1 != "quiet" ]] && echo "for p in \$(ls ~/.zen/game/players/); do rm -Rf ~/.zen/game/players/\$p"
|
||||||
|
[[ $1 != "quiet" ]] && echo "for k in \$(ipfs key list | grep \$p); do ipfs key rm \$k; done; done"
|
||||||
|
[[ $1 != "quiet" ]] && echo "_____ALL PLAYERS REMOVAL____"
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
## SET CURRENT PLAYER
|
## SET CURRENT PLAYER
|
||||||
rm -f ~/.zen/game/players/.current
|
rm -f ~/.zen/game/players/.current
|
||||||
ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current
|
ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current
|
||||||
|
|
||||||
[[ $1 != "quiet" ]] && echo "_____ REINIT COMMAND____"
|
|
||||||
[[ $1 != "quiet" ]] && echo "for p in \$(ls ~/.zen/game/players/); do rm -Rf ~/.zen/game/players/\$p"
|
|
||||||
[[ $1 != "quiet" ]] && echo "for k in \$(ipfs key list | grep \$p); do ipfs key rm \$k; done; done"
|
|
||||||
[[ $1 != "quiet" ]] && echo "_____ALL PLAYERS REMOVAL____"
|
|
||||||
|
|
||||||
[[ $1 != "quiet" ]] && echo "Bienvenue 'Astronaute' $PSEUDO ($PLAYER)"
|
[[ $1 != "quiet" ]] && echo "Bienvenue 'Astronaute' $PSEUDO ($PLAYER)"
|
||||||
[[ $1 != "quiet" ]] && echo "Votre PASS : $PASS"; sleep 2
|
[[ $1 != "quiet" ]] && echo "Souvenez-vous bien de votre PASS : $PASS"; sleep 2
|
||||||
|
|
||||||
echo $PSEUDO > ~/.zen/tmp/PSEUDO ## Return data to start.sh
|
echo $PSEUDO > ~/.zen/tmp/PSEUDO ## Return data to start.sh
|
||||||
echo "cool $(${MY_PATH}/face.sh cool)"
|
echo "cool $(${MY_PATH}/face.sh cool)"
|
||||||
|
|
Loading…
Reference in New Issue