anonymous
This commit is contained in:
parent
704a0b71e0
commit
159f411e01
|
@ -117,7 +117,7 @@ do
|
|||
|
||||
## MOVE INTO PLAYER AREA
|
||||
echo "Ŋ1 FLUX ~/.zen/game/players/$PLAYER/G1${WISHNAME}/${G1PUB}"
|
||||
mv -f ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME} ~/.zen/game/players/$PLAYER/G1${WISHNAME}/${G1PUB}
|
||||
mv -f ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/* ~/.zen/game/players/$PLAYER/G1${WISHNAME}/${G1PUB}/
|
||||
|
||||
done < ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt
|
||||
|
||||
|
|
|
@ -45,21 +45,21 @@ CHOICE="$3"
|
|||
players=($(ls ~/.zen/game/players | grep -Ev "localhost" 2>/dev/null))
|
||||
|
||||
[[ ${#players[@]} -ne 1 ]] \
|
||||
&& espeak "PLEASE CONNECT A PLAYER" && OUTPUT=$(zenity --entry --width 640 --title="=> Astroport" --text="ASTRONAUTE ?" --entry-text=${players[@]}) \
|
||||
&& espeak "CHOOSE PLAYER" && OUTPUT=$(zenity --entry --width 640 --title="=> Astroport" --text="ASTRONAUTE ?" --entry-text=${players[@]}) \
|
||||
|| OUTPUT="${players}"
|
||||
|
||||
echo "PLAYER = $OUTPUT"
|
||||
PLAYER=$OUTPUT
|
||||
|
||||
[[ $OUTPUT ]] && ( PLAYER=$OUTPUT && rm -f ~/.zen/game/players/.current && ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current ) \
|
||||
[[ $OUTPUT ]] && ( PLAYER=$OUTPUT && rm -f ~/.zen/game/players/.current && ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current && espeak "CONNECTED" && . "${MY_PATH}/tools/my.sh" ) \
|
||||
|| espeak "NO PLAYER"
|
||||
|
||||
[[ ${PLAYER} == "" ]] \
|
||||
[[ $PLAYER == "" ]] \
|
||||
&& ${MY_PATH}/start.sh \
|
||||
&& espeak "Astronaut. Please register." \
|
||||
&& xdg-open "http://astroport.localhost:1234" \
|
||||
&& exit 1
|
||||
&& exit 1 \
|
||||
|| PSEUDO=$(myPlayerUser)
|
||||
|
||||
PSEUDO=$(myPlayerUser)
|
||||
espeak "Hello $PSEUDO"
|
||||
|
||||
G1PUB=$(myPlayerG1Pub)
|
||||
|
@ -146,11 +146,15 @@ fi
|
|||
ISADDING=$(ps auxf --sort=+utime | grep -w 'ipfs add' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
ISPUBLISHING=$(ps auxf --sort=+utime | grep -w 'ipfs name publish' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
[[ $ISADDING || $ISPUBLISHING ]] \
|
||||
&& espeak "I P F S not ready. Wait and try again" && exit 1
|
||||
&& espeak "I P F S task in progress. Wait finish & try later" && exit 1
|
||||
|
||||
########################################################################
|
||||
espeak "restart I P F S daemon"
|
||||
[[ "$isLAN" ]] && sudo systemctl restart ipfs && sleep 7
|
||||
|
||||
espeak "restarting I P F S daemon"
|
||||
[[ "$isLAN" ]] && sudo systemctl restart ipfs
|
||||
while [[ ! $(netstat -tan | grep 5001 | grep LISTEN) ]]; do
|
||||
sleep 1
|
||||
done
|
||||
## CHECK IF ASTROPORT/CRON/IPFS IS RUNNING
|
||||
YOU=$(myIpfsApi)
|
||||
[[ ! $YOU ]] && espeak "I P F S not running - EXIT" && exit 1
|
||||
|
|
|
@ -35,16 +35,16 @@ if [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ]]; then
|
|||
|
||||
## KEEPING ALREADY EXISTING PROFILE DATA
|
||||
NAME=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.title' 2>/dev/null)
|
||||
[[ ! $NAME || $NAME == "null" ]] && NAME="Astronaute ${PSEUDO}"
|
||||
[[ ! $NAME || $NAME == "null" ]] && NAME=""
|
||||
|
||||
DESCR=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.description' 2>/dev/null)
|
||||
[[ ! $DESCR || $DESCR == "null" ]] && DESCR="ASTROPORT Ŋ1 https://g1jeu.ml"
|
||||
[[ ! $DESCR || $DESCR == "null" ]] && DESCR=""
|
||||
|
||||
VILLE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.city' 2>/dev/null)
|
||||
[[ ! $VILLE || $VILLE == "null" ]] && VILLE="Paris, 75012"
|
||||
[[ ! $VILLE || $VILLE == "null" ]] && VILLE=""
|
||||
|
||||
ADRESSE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.address' 2>/dev/null)
|
||||
[[ ! $ADRESSE || $ADRESSE == "null" ]] && ADRESSE="Elysée"
|
||||
[[ ! $ADRESSE || $ADRESSE == "null" ]] && ADRESSE=""
|
||||
|
||||
# POSITION=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.geoPoint')
|
||||
# SITE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.socials' 2>/dev/null)
|
||||
|
|
Loading…
Reference in New Issue