From 3179a6be2dde961ec847ffccf58e8262b695e1dc Mon Sep 17 00:00:00 2001 From: qo-op Date: Tue, 17 Nov 2020 11:49:20 +0100 Subject: [PATCH] Please rm -f ~/.zen/secret* before running $ME --- zen/tools/init_IPFS_with_cesium_loginKEY.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zen/tools/init_IPFS_with_cesium_loginKEY.sh b/zen/tools/init_IPFS_with_cesium_loginKEY.sh index 7694a55..0aaee90 100755 --- a/zen/tools/init_IPFS_with_cesium_loginKEY.sh +++ b/zen/tools/init_IPFS_with_cesium_loginKEY.sh @@ -5,6 +5,8 @@ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" +[[ -f ~/.zen/secret ]] && echo "Please rm -f ~/.zen/secret* before running $ME" && exit 1 + echo '>>>>>>> METAVERSE KEY CREATION <<<<<<<< __ __ ____ @@ -101,8 +103,9 @@ echo "Configure IPFS: copy the lines above in your console" echo "then run jq commands and make your IPFS NODE https://Cesium.app compatible" echo " -> Read your Cesium messages to find how to Bootstrap your node" echo -echo "jq -r --arg PeerID \"\$PeerID\" '.Identity.PeerID=\$PeerID' ~/.ipfs/config" -echo "jq -r --arg PrivKey \"\$PrivKey\" '.Identity.PrivKey=\$PrivKey' ~/.ipfs/config" +echo "cp -f ~/.ipfs/config ~/.ipfs/config.old" +echo "jq -r --arg PeerID \"\$PeerID\" '.Identity.PeerID=\$PeerID' ~/.ipfs/config > /tmp/config.tmp" +echo "jq -r --arg PrivKey \"\$PrivKey\" '.Identity.PrivKey=\$PrivKey' /tmp/config.tmp > ~/.ipfs/config" echo "" rm -f /tmp/secret.dunikey }