Skip to content

Commit

Permalink
nc-info: fixed api change for portchecker (#1194)
Browse files Browse the repository at this point in the history
Signed-off-by: detlef <ds2@physik.de>
  • Loading branch information
dsmic authored and nachoparker committed Oct 20, 2020
1 parent f00fe21 commit 9450613
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion bin/ncp-diag
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ echo "internet check|$( ping -W 2 -w 1 -q github.com &>/dev/null && echo ok || e
function is_port_open()
{
PORT=$1
wget -T2 -t1 -q https://portchecker.co --post-data "port=$PORT" -O - \
tmp_file=$(mktemp)
v=$(wget -T2 -t1 -q --keep-session-cookies --save-cookies $tmp_file https://portchecker.co -O - | grep -oP "_csrf\" value=\"\K.*\"")
wget -T2 -t1 -q --load-cookies $tmp_file https://portchecker.co --post-data "port=$PORT&_csrf=${v::-1}" -O - \
| grep -q '<span class="green">open</span>' && { echo "open"; return 1; }
echo "closed"
rm $tmp_file
}

echo "port check 80|$( is_port_open 80 )"
Expand Down
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

[v1.30.0](https://github.com/nextcloud/nextcloudpi/commit/bb96f7a) (2020-09-19) upgrade to NC19.0.2
[v1.30.1](https://github.com/nextcloud/nextcloudpi/commit/fab4457) (2020-10-20) nc-info: fixed api change for portchecker (#1194)

[v1.30.0](https://github.com/nextcloud/nextcloudpi/commit/f00fe21) (2020-09-19) upgrade to NC19.0.2

[v1.29.10](https://github.com/nextcloud/nextcloudpi/commit/82baebf) (2020-09-03) ncp-web: added a lot of german locales

[v1.29.9 ](https://github.com/nextcloud/nextcloudpi/commit/3706ed0) (2020-09-12) nc-previews: fix killing generate-all

[v1.29.8](https://github.com/nextcloud/nextcloudpi/commit/21a791d) (2020-08-30) nc-limits: minimum 6 PHP threads (for NC talk)
[v1.29.8, master](https://github.com/nextcloud/nextcloudpi/commit/21a791d) (2020-08-30) nc-limits: minimum 6 PHP threads (for NC talk)

[v1.29.6 ](https://github.com/nextcloud/nextcloudpi/commit/14b78e3) (2020-08-29) ncp-web: Fix the style of the language selection dropdown (chrome)

Expand Down

0 comments on commit 9450613

Please sign in to comment.