3 mn timeout

This commit is contained in:
fred 2021-08-05 23:36:50 +02:00
parent 4f4b458c94
commit 9394661d51
1 changed files with 3 additions and 3 deletions

View File

@ -4,18 +4,18 @@ MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
########################################################################
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
IPFSNODEID=$(ipfs --timeout=30s 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 --timeout=90s add -rHq ~/.zen/ipfs | tail -n 1)
MIPFS=$(ipfs --timeout=180s 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 --timeout=90s name publish --quieter /ipfs/$MIPFS)
NODEIPNS=$(ipfs --timeout=180s name publish --quieter /ipfs/$MIPFS)
echo "$NODEIPNS:TIME:$(cat ~/.zen/ipfs/.${IPFSNODEID}/.timestamp):CHAIN:$(cat ~/.zen/ipfs/.${IPFSNODEID}/.chain)"
fi
########################################################################