-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use UniFi's API to grab latest version #151
Comments
Perhaps mention this over in the active pull request (#141) for this feature? |
Think this should work. Just update install script UNIFI_SOFTWARE_URL=$(curl -s 'https://fw-update.ubnt.com/api/firmware?filter=eq~~product~~unifi-controller&filter=eq~~platform~~unix&filter=eq~~channel~~release&sort=-version&limit=1' | jq '._embedded.firmware[0]._links.data.href' ) Requirements are jq and curl. Will post this over in request 141. |
Isn't this just the firmware? it currently serves version 5.11.50 while the latest is 5.12.22 |
Adding an extra I'll open a PR in a bit to update the "official" installation script to be able to pull either a "known good", specific, or latest version from the Ubiquiti servers. UNIFI_SOFTWARE_URL=$(curl -s 'https://fw-update.ubnt.com/api/firmware?filter=eq~~product~~unifi-controller&filter=eq~~platform~~unix&filter=eq~~channel~~release&sort=-version&limit=1' | jq '._embedded.firmware[0]._links.data.href' | jq -r 'match("(([\\d]+[.]){2}[\\d]+)").string');
echo "Installing version - ${UNIFI_SOFTWARE_URL}"; |
Hey guys, I recently discovered this API that the UniFi controller reaches out to check for updates. After some research & guessing, I ended up with this URL we can use to figure out the download link to the latest controller version:
https://fw-update.ubnt.com/api/firmware?filter=eq~~product~~unifi-controller&filter=eq~~platform~~unix&filter=eq~~channel~~release&sort=-version&limit=1
Unfortunately, I don't have the knowledge to actually implement this into the script. I leave it to one of the many capable members of this repo. (Perhaps @joshyrobot since he has a related PR?)
The text was updated successfully, but these errors were encountered: