From 155640fb2a054f6d5f9cec4979817d50c9c2bbfe Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 9 Dec 2022 01:09:17 +0100 Subject: [PATCH] compatibiliy --- start.sh | 10 +++++----- tools/VOEUX.print.sh | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index fbbcebe9..b096fdfb 100755 --- a/start.sh +++ b/start.sh @@ -86,14 +86,14 @@ echo 'PRESS ENTER... '; read PLAYER=$fav -pass=$(cat ~/.zen/game/players/.current/.pass 2>/dev/null) +pass=$(cat ~/.zen/game/players/$PLAYER/.pass 2>/dev/null) ########################################## DEVEL echo "Saisissez votre PASS -- UPGRADE CRYPTO FREELY -- $pass" && read PASS ## DECODE CURRENT PLAYER CRYPTO # echo "********* DECODAGE SecuredSocketLayer *********" # rm -f ~/.zen/tmp/${PLAYER}.dunikey 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>&1>/dev/null +# openssl enc -aes-256-cbc -d -in "$HOME/.zen/game/players/${PLAYER}/enc.secret.dunikey" -out "$HOME/.zen/tmp/${PLAYER}.dunikey" -k $pass 2>&1>/dev/null [[ $PASS != $pass ]] && echo "ERROR. MAUVAIS PASS. EXIT" && exit 1 rm -f ~/.zen/game/players/.current @@ -111,7 +111,7 @@ echo "ENTREE ACCORDEE" echo ASTRONAUTENS=$(ipfs key list -l | grep -w "$PLAYER" | cut -d ' ' -f 1) -echo "$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null) TW/Moa" +echo "$(cat ~/.zen/game/players/${PLAYER}/.pseudo 2>/dev/null) TW/Moa" echo "http://$myIP:8080/ipns/$ASTRONAUTENS" echo "Activation RĂ©seau P2P Astroport !" @@ -127,7 +127,7 @@ select fav in "${choices[@]}"; do "EXPORTER VISA") echo "EXPORT IDENTITE ASTRONAUTE" - du -h ~/.zen/game/players/.current/ + du -h ~/.zen/game/players/$PLAYER/ echo "MANUAL BACKUP ZIP ~/.zen/game/players/$PLAYER/" ## EXPORT TW + VOEUX IPNS KEYS @@ -181,7 +181,7 @@ select fav in "${choices[@]}"; do ;; "IMPRIMER QRVOEU") - ${MY_PATH}/tools/VOEUX.print.sh + ${MY_PATH}/tools/VOEUX.print.sh $PLAYER ;; "QUITTER") diff --git a/tools/VOEUX.print.sh b/tools/VOEUX.print.sh index 443f9b3a..bb2a24a8 100755 --- a/tools/VOEUX.print.sh +++ b/tools/VOEUX.print.sh @@ -7,6 +7,8 @@ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" +PLAYER=$1 + [[ $PLAYER == "" ]] && PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null) [[ $PLAYER == "" ]] && echo "PLAYER manquant" && exit 1 PSEUDO=$(cat ~/.zen/game/players/$PLAYER/.pseudo 2>/dev/null)