From d0013000e2fa5138435bcd4b550d89e113f36b4b Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 6 Mar 2024 15:29:39 +0100 Subject: [PATCH] ! -s ~/.zen/game/myswarm_secret = refresh key --- _12345.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_12345.sh b/_12345.sh index a8dae77c..d1f397fe 100755 --- a/_12345.sh +++ b/_12345.sh @@ -47,10 +47,11 @@ CHAN=$(ipfs key list -l | grep -w "MySwarm_${IPFSNODEID}" | cut -d ' ' -f 1) ####################################################### ## CREATE MySwarm KEYS ? -if [[ ${CHAN} == "" || ${CHAN} == "null" ]]; then +if [[ ${CHAN} == "" || ${CHAN} == "null" || ! -s ~/.zen/game/myswarm_secret.june ]]; then echo "## MAKE /proc/cpuinfo IPFSNODEID DERIVATED KEY ##" SECRET1=$(cat /proc/cpuinfo | grep -Ev MHz | sha512sum | cut -d ' ' -f 1) SECRET2=${IPFSNODEID} + ipfs key rm "MySwarm_${IPFSNODEID}" echo "SALT=$SECRET1 && PEPPER=$SECRET2" > ~/.zen/game/myswarm_secret.june ${MY_PATH}/tools/keygen -t ipfs -o ~/.zen/game/myswarm_secret.ipfskey "$SECRET1" "$SECRET2" ${MY_PATH}/tools/keygen -t duniter -o ~/.zen/game/myswarm_secret.dunikey "$SECRET1" "$SECRET2"