This commit is contained in:
fred 2021-08-05 04:09:35 +02:00
parent dbf02f0138
commit 7cd0312096
1 changed files with 10 additions and 10 deletions

View File

@ -45,15 +45,15 @@ do
$MY_PATH/natools.py decrypt -f pubsec -k "$HOME/.zen/secret.dunikey" -i "$HOME/.zen/ipfs_swarm/.${ipfsnodesource}/KEY/${mediakey}/${g1source}/${G1PUB}/.ipns.mediakey.encrypt" -o "/tmp/ipns.mediakey"
if [[ -f /tmp/ipns.mediakey ]]; then
KEYFILE=$($MY_PATH/give_me_keystore_filename.py "${mediakey}")
[[ ! -f ~/.ipfs/keystore/$KEYFILE ]] && mv /tmp/ipns.mediakey ~/.ipfs/keystore/$KEYFILE || echo "KEYSTORE EXISTING. EXIT" && continue
[[ ! -f ~/.ipfs/keystore/$KEYFILE ]] && mv /tmp/ipns.mediakey ~/.ipfs/keystore/$KEYFILE || ( echo "KEYSTORE EXISTING. EXIT" && continue )
echo "${mediakey}" > ~/.zen/PIN/${astrofile}/MEDIAKEY
echo "$(ipfs key list -l | grep ${mediakey} | cut -d ' ' -f 1)" > ~/.zen/PIN/${astrofile}/IPNSLINK
## USED BY BOOTSTRAP IN ipns_TAG_refresh.sh TO REFRESH MEDIAKEY publishing
fi
fi
else
echo "ALREADY PINNED"
continue
echo "ALREADY PINNED"
continue
fi
## TOOD : DECIDE TO ACTIVATE THIS BEHAVIOUR OR NOT ?