timeout.sh

This commit is contained in:
qo-op 2020-06-03 02:09:46 +02:00
parent 77e4ad22bd
commit 44389cd31d
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ ME="${0##*/}"
####
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running"
export IPFSNODEID=$(ipfs id -f='<id>\n') || er+=" ipfs id problem"
export WHOAMI=$(sbotc whoami | jq -r .id) || er+=" sbotc whoami problem"
export WHOAMI=$($MY_PATH/zen/tools/timeout.sh -t 3 sbotc whoami | jq -r .id) || er+=" sbotc whoami problem"
[[ "$YOU" == "" || "$IPFSNODEID" == "" || "$WHOAMI" == "" ]] && echo "ERROR : $er " && exit 1
########################################################################
# HELP DEVLT: Search "TODO" in code