Update omada.sh

This commit is contained in:
CanbiZ 2024-12-20 13:49:58 +01:00 committed by GitHub
parent e715adf3ba
commit 326f706672
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,9 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
latest_url=$(curl -fsSL "https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -oP 'href="([^"]+linux_x64[^"]+\.deb)' | sed 's/href="//' | sort | tail -n 1)
latest_url=$(curl -s "https://support.omadanetworks.com/en/product/omada-software-controller/?resourceType=download" | \
grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | \
head -n 1)
latest_version=$(basename "$latest_url")
if [ -z "${latest_version}" ]; then
msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time."