Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-05-18 12:08:21 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-18 12:15:49 +0300
commitcd32b30a707e7b1cbe55d39fe61c8d243d34f3ce (patch)
tree2bee2c147573d3961765fc2860e942add1a0d043 /bin/ncp-diag
parent93a94da1822f2743efc95174d45b8a5480399daa (diff)
nc-info: change port checker providersv0.56.4
Diffstat (limited to 'bin/ncp-diag')
-rw-r--r--bin/ncp-diag7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag
index 433843f4..4d9159bb 100644
--- a/bin/ncp-diag
+++ b/bin/ncp-diag
@@ -59,10 +59,9 @@ echo "internet check|$( ping -W 2 -w 1 -q github.com &>/dev/null && echo ok || e
function is_port_open()
{
PORT=$1
- 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"
+ wget -T2 -t1 -q https://portchecker.co/check --post-data "port=$PORT" -O - \
+ | grep -q '<span class="green">open</span>' && { echo "open"; return 1; }
+ echo "closed"
}
echo "port check 80|$( is_port_open 80 )"