Skip to content

Commit

Permalink
nc-info: change port checker providers
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed May 18, 2018
1 parent 93a94da commit cd32b30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions bin/ncp-diag
Original file line number Diff line number Diff line change
Expand Up @@ -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 )"
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v0.56.3](https://github.com/nextcloud/nextcloudpi/commit/7086145) (2018-05-17) nc-update-nextcloud: make sure backup syncs to disk
[v0.56.4](https://github.com/nextcloud/nextcloudpi/commit/d9ccd20) (2018-05-18) nc-info: change port checker providers

[v0.56.3](https://github.com/nextcloud/nextcloudpi/commit/31543e6) (2018-05-17) nc-update-nextcloud: make sure backup syncs to disk

[v0.56.2](https://github.com/nextcloud/nextcloudpi/commit/5ff8675) (2018-05-15) nc-restore: refuse to restore from /var/www/nextcloud

Expand Down

0 comments on commit cd32b30

Please sign in to comment.