mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 22:29:54 +07:00
networkdiag: add useridapi check
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
167d909e13
commit
cf2daa9807
@ -1281,14 +1281,21 @@ function networkdiag() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
GITHUBAPI=$(curl --interface ${N} -skL "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1 2>/dev/null)
|
HWID="$(genHWID)"
|
||||||
|
USERIDAPI="$(curl --interface ${N} -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||||
|
if [[ $? -ne 0 || -z "${USERIDAPI}" ]]; then
|
||||||
|
echo -e "Arc UserID API not reachable!"
|
||||||
|
else
|
||||||
|
echo -e "Arc UserID API reachable! (${USERIDAPI})"
|
||||||
|
fi
|
||||||
|
GITHUBAPI=$(curl --interface ${N} -skL -m 10 "https://api.github.com/repos/AuxXxilium/arc/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1 2>/dev/null)
|
||||||
if [[ $? -ne 0 || -z "${GITHUBAPI}" ]]; then
|
if [[ $? -ne 0 || -z "${GITHUBAPI}" ]]; then
|
||||||
echo -e "Github API not reachable!"
|
echo -e "Github API not reachable!"
|
||||||
else
|
else
|
||||||
echo -e "Github API reachable!"
|
echo -e "Github API reachable!"
|
||||||
fi
|
fi
|
||||||
if [ "${CONFDONE}" == "true" ]; then
|
if [ "${CONFDONE}" == "true" ]; then
|
||||||
SYNOAPI=$(curl --interface ${N} -m 5 -skL "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODEL/+/%2B}&major=${PRODUCTVER%%.*}&minor=${PRODUCTVER##*.}" | jq -r '.info.system.detail[0].items[0].files[0].url')
|
SYNOAPI=$(curl --interface ${N} -skL -m 10 "https://www.synology.com/api/support/findDownloadInfo?lang=en-us&product=${MODEL/+/%2B}&major=${PRODUCTVER%%.*}&minor=${PRODUCTVER##*.}" | jq -r '.info.system.detail[0].items[0].files[0].url')
|
||||||
if [[ $? -ne 0 || -z "${SYNOAPI}" ]]; then
|
if [[ $? -ne 0 || -z "${SYNOAPI}" ]]; then
|
||||||
echo -e "Syno API not reachable!"
|
echo -e "Syno API not reachable!"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user