forked from axiom-team/astrXbian
Now PIN MEDIAKEY is re-published by bootstrap (avoid DHT emptyness when station is OFF)
This commit is contained in:
parent
c98a5bc7b6
commit
d5feff7d4f
@ -216,10 +216,10 @@ done
|
|||||||
## Then refresh MEDIAKEY IPNS/IPFS RELATION
|
## Then refresh MEDIAKEY IPNS/IPFS RELATION
|
||||||
## CORRECT ISSUE : https://git.p2p.legal/axiom-team/astrXbian/issues/25
|
## CORRECT ISSUE : https://git.p2p.legal/axiom-team/astrXbian/issues/25
|
||||||
########################################################################
|
########################################################################
|
||||||
for ipnslink in $(ls ~/.zen/PIN/*/IPNSLINK);
|
for ipnslink in $(ls ~/.zen/PIN/*/IPNSLINK); do
|
||||||
ipnsid=$(cat $ipnslink)
|
ipnsid=$(cat $ipnslink)
|
||||||
ipfsid=$(echo $ipnslink | cut -d '/' -f 6)
|
ipfsid=$(echo $ipnslink | cut -d '/' -f 6)
|
||||||
mediakey=$(cat~/.zen/PIN/${ipfsid}/MEDIAKEY)
|
mediakey=$(cat ~/.zen/PIN/${ipfsid}/MEDIAKEY)
|
||||||
|
|
||||||
[[ ! $(ipfs key list | grep ${mediakey}) ]] && echo "ERROR MISSING MEDIAKEY" && continue
|
[[ ! $(ipfs key list | grep ${mediakey}) ]] && echo "ERROR MISSING MEDIAKEY" && continue
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ do
|
|||||||
[[ ! -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 "${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
|
||||||
|
## USED BY BOOTSTRAP IN ipns_TAG_refresh.sh TO REFRESH MEDIAKEY publishing
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user