diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 931fb2eb9..42e76c159 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -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='\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 diff --git a/zen/port_SSH_one2one.sh b/zen/port_SSH_one2one.sh index 3adf8463c..531ac2964 100755 --- a/zen/port_SSH_one2one.sh +++ b/zen/port_SSH_one2one.sh @@ -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