diff options
author | Owl <12261439+ZendaiOwl@users.noreply.github.com> | 2022-10-21 11:31:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 11:31:42 +0300 |
commit | 5061bbc14bc30854a8bd6e4071d6efb195e097e7 (patch) | |
tree | 7f71b4a2d7e9cfe340978522a9d9ce92239c95ee | |
parent | 9975742ff32dcafa8473dfe9569e8ce1cbf1c33d (diff) |
Update ncp-diagfix/port-check-url
- Fix the portchecker.com URL, changed from `/check` to `/checking`
- Changed "NextCloudPi" to "NextcloudPi" in this file
Signed-off-by: Owl <12261439+ZendaiOwl@users.noreply.github.com>
-rw-r--r-- | bin/ncp-diag | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag index 8241ed57..55bbafb8 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -1,6 +1,6 @@ #!/bin/bash -# NextCloudPi diagnostics report +# NextcloudPi diagnostics report # # Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com> # GPL licensed (see end of file) * Use at your own risk! @@ -14,8 +14,8 @@ source /usr/local/etc/library.sh # Distro, NCP version and tag -echo "NextCloudPi version|$( cat /usr/local/etc/ncp-version )" -[[ -f /usr/local/etc/ncp-baseimage ]] && echo "NextCloudPi image|$( cat /usr/local/etc/ncp-baseimage )" +echo "NextcloudPi version|$( cat /usr/local/etc/ncp-version )" +[[ -f /usr/local/etc/ncp-baseimage ]] && echo "NextcloudPi image|$( cat /usr/local/etc/ncp-baseimage )" echo "OS|$(cat /etc/issue | sed 's| \\n \\l||'). $(uname -r) ($(uname -m))" # Data @@ -83,8 +83,8 @@ function is_port_open() fi token=$(wget -T2 -t1 -qO- --keep-session-cookies --save-cookies "${tmp_file}" "${port_url}" | grep -oP "_csrf\" value=\"\K.*\"" ) - readonly ipv4_portcheck_args=(-T2 -t1 -qO- --load-cookies "${tmp_file}" "${port_url}/check" --post-data "target_ip=${publicIPv4}&port=${port}&_csrf=${token::-1}") - readonly ipv6_portcheck_args=(-T2 -t1 -qO- --load-cookies "${tmp_file}" "${port_url}/check" --post-data "target_ip=${publicIPv6}&port=${port}&_csrf=${token::-1}") + readonly ipv4_portcheck_args=(-T2 -t1 -qO- --load-cookies "${tmp_file}" "${port_url}/checking" --post-data "target_ip=${publicIPv4}&port=${port}&_csrf=${token::-1}") + readonly ipv6_portcheck_args=(-T2 -t1 -qO- --load-cookies "${tmp_file}" "${port_url}/checking" --post-data "target_ip=${publicIPv6}&port=${port}&_csrf=${token::-1}") [[ -n "${token}" ]] || { echo -n "Error - Couldn't obtain a token for port check" |