diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-04-25 10:47:29 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-04-25 10:48:01 +0300 |
commit | b1991214131cee42377dadb092861dbe5493cff2 (patch) | |
tree | 644ea09d8aaf38cf6e144a8f2a8f139dcb0f5903 /bin/ncp-diag | |
parent | bc0c0d5a2cf216430ad1894878f48c1ad5b621a5 (diff) |
nc-info: provide timeout for wgetv0.53.33
Diffstat (limited to 'bin/ncp-diag')
-rw-r--r-- | bin/ncp-diag | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag index 573e14c0..433843f4 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -59,8 +59,8 @@ echo "internet check|$( ping -W 2 -w 1 -q github.com &>/dev/null && echo ok || e function is_port_open() { PORT=$1 - wget -q http://canyouseeme.org --post-data \ - "IP=$(wget -q ipinfo.io/ip -O -)&port=$PORT" \ + wget -T2 -q http://canyouseeme.org --post-data \ + "IP=$(wget -T2 -q ipinfo.io/ip -O -)&port=$PORT" \ -O - | grep -q "Connection refused" && { echo "closed"; return 1; } echo "open" } |