forked from axiom-team/astrXbian
No timeout on "ipfs add" before publish, or get rubbish
This commit is contained in:
parent
3f40eb11d9
commit
db0ca70a63
@ -250,12 +250,13 @@ for ipnslink in $(ls ~/.zen/PIN/*/IPNSLINK); do
|
|||||||
## GET ACTUAL IPNS .chain VALUE
|
## GET ACTUAL IPNS .chain VALUE
|
||||||
mkdir -p /tmp/${mediakey}
|
mkdir -p /tmp/${mediakey}
|
||||||
echo "${mediakey} GET IPNS"
|
echo "${mediakey} GET IPNS"
|
||||||
ipfs --timeout 20s get -o /tmp/${mediakey} /ipns/$ipnsid
|
ipfs get -o /tmp/${mediakey} /ipns/$ipnsid
|
||||||
|
[ $? -ne 0 ] && continue
|
||||||
echo "ADD TO IPFS"
|
echo "ADD TO IPFS"
|
||||||
NEWIPFS=$(ipfs add -rHq /tmp/${mediakey}/ | tail -n 1)
|
NEWIPFS=$(ipfs add -rHq /tmp/${mediakey}/ | tail -n 1)
|
||||||
|
|
||||||
## PUBLISH IT
|
## PUBLISH IT
|
||||||
ipfs --timeout 60s name publish -k ${mediakey} --quieter /ipfs/$NEWIPFS
|
ipfs name publish -k ${mediakey} --quieter /ipfs/$NEWIPFS
|
||||||
echo "ECHO PUBLISHING https://tube.copylaradio.com/ipns/$ipnsid TO /ipfs/$NEWIPFS"
|
echo "ECHO PUBLISHING https://tube.copylaradio.com/ipns/$ipnsid TO /ipfs/$NEWIPFS"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ IPFSNODEID=$(ipfs --timeout=30s id -f='<id>\n')
|
|||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "PUBLISHING ~/.zen/ipfs SELF http://127.0.0.1:8181/ipns/$IPFSNODEID"
|
echo "PUBLISHING ~/.zen/ipfs SELF http://127.0.0.1:8181/ipns/$IPFSNODEID"
|
||||||
MIPFS=$(ipfs --timeout=180s add -rHq ~/.zen/ipfs | tail -n 1)
|
MIPFS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
||||||
OLDCHAIN=$(cat ~/.zen/ipfs/.${IPFSNODEID}/.chain)
|
OLDCHAIN=$(cat ~/.zen/ipfs/.${IPFSNODEID}/.chain)
|
||||||
if [[ "$OLDCHAIN" != "$MIPFS" ]] # MODIFY CHAIN only if something was changed
|
if [[ "$OLDCHAIN" != "$MIPFS" ]] # MODIFY CHAIN only if something was changed
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user