NO IP GATEWAY : EXIT

This commit is contained in:
qo-op 2021-02-18 11:02:42 +01:00
parent 918e55396a
commit 4f604593a3
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,9 @@ source $HOME/.profile
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
[[ $IPFSNODEID ]] && export IPFSNODEID=$IPFSNODEID || export IPFSNODEID=$(ipfs id -f='<id>\n')
### NO IP GATEWAY : EXIT
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || (echo "NO GATEWAY CONNEXION" && exit 1)
########################################################################
# HELP DEVLT: Search "TODO" in code
# Write what you thing about the situation

View File

@ -17,4 +17,4 @@ WHOAMI=$(sbotc whoami | jq -r .id) || er+=" sbotc whoami problem"
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)
ipfs p2p listen /x/$XZUID-ssh /ip4/127.0.0.1/tcp/22 # or CLOSE ipfs p2p close /x/$UIDNA-ssh
[[ $XZUID ]] && ipfs p2p listen /x/$XZUID-ssh /ip4/127.0.0.1/tcp/22 # or CLOSE ipfs p2p close /x/$UIDNA-ssh