forked from axiom-team/astrXbian
KEYFILE debug
This commit is contained in:
parent
4ab8b91342
commit
27f780425a
@ -44,15 +44,8 @@ do
|
|||||||
if [[ -f $HOME/.zen/ipfs_swarm/.${ipfsnodesource}/KEY/${mediakey}/${g1source}/${G1PUB}/.ipns.mediakey.encrypt ]]; then
|
if [[ -f $HOME/.zen/ipfs_swarm/.${ipfsnodesource}/KEY/${mediakey}/${g1source}/${G1PUB}/.ipns.mediakey.encrypt ]]; then
|
||||||
$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"
|
$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
|
if [[ -f /tmp/ipns.mediakey ]]; then
|
||||||
## FIND ipns key file name
|
KEYFILE=$($MY_PATH/give_me_keystore_filename.py "${mediakey}")
|
||||||
KEYFILE=$(ipfs key list | grep "${mediakey}") ## BUG !! THIS IS NOT FILE NAME !!
|
[[ ! -f ~/.ipfs/keystore/$KEYFILE ]] && mv /tmp/ipns.mediakey ~/.ipfs/keystore/$KEYFILE || echo "KEYSTORE EXISTING. EXIT" && continue
|
||||||
if [[ ! $KEYFILE ]]; then
|
|
||||||
KEY=$(ipfs key gen "${mediakey}")
|
|
||||||
KEYFILE=$(ls -t ~/.ipfs/keystore/ | head -n 1)
|
|
||||||
fi
|
|
||||||
## REPLACE with GOOD MEDIAKEY FILE into ~/.ipfs/keystore/
|
|
||||||
rm -f ~/.ipfs/keystore/$KEYFILE
|
|
||||||
mv /tmp/ipns.mediakey ~/.ipfs/keystore/$KEYFILE
|
|
||||||
echo "${mediakey}" > ~/.zen/PIN/${astrofile}/MEDIAKEY
|
echo "${mediakey}" > ~/.zen/PIN/${astrofile}/MEDIAKEY
|
||||||
echo "$(ipfs key list -l | grep ${mediakey} | cut -d ' ' -f 1)" > ~/.zen/PIN/${astrofile}/IPNSLINK
|
echo "$(ipfs key list -l | grep ${mediakey} | cut -d ' ' -f 1)" > ~/.zen/PIN/${astrofile}/IPNSLINK
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user