--timeout=60s
This commit is contained in:
parent
cf7d342a8a
commit
82e463d4aa
|
@ -4,16 +4,17 @@ MY_PATH="`dirname \"$0\"`" # relative
|
|||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
########################################################################
|
||||
export IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n')
|
||||
[[ $IPFSNODEID == "" ]] && echo "ipfs TIMEOUT" && exit 1
|
||||
|
||||
########################################################################
|
||||
echo "PUBLISHING ~/.zen/ipfs SELF http://127.0.0.1:8181/ipns/$IPFSNODEID"
|
||||
MIPFS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
||||
MIPFS=$(ipfs --timeout=60s add -rHq ~/.zen/ipfs | tail -n 1)
|
||||
OLDCHAIN=$(cat ~/.zen/ipfs/.${IPFSNODEID}/.chain)
|
||||
if [[ "$OLDCHAIN" != "$MIPFS" ]] # MODIFY CHAIN only if something was changed
|
||||
then
|
||||
echo "$(date -u +%s%N | cut -b1-13)" > ~/.zen/ipfs/.${IPFSNODEID}/.timestamp
|
||||
echo $MIPFS > ~/.zen/ipfs/.${IPFSNODEID}/.chain
|
||||
NODEIPNS=$(ipfs name publish --quieter /ipfs/$MIPFS)
|
||||
NODEIPNS=$(ipfs --timeout=60s name publish --quieter /ipfs/$MIPFS)
|
||||
fi
|
||||
########################################################################
|
||||
|
|
Loading…
Reference in New Issue