mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-11 01:44:38 +00:00
Fix: Omada check for AVX Support and use the correct MongoDB Version (#2600)
* Update omada-install.sh * Update omada-install.sh * Update omada.sh
This commit is contained in:
parent
43dc12074d
commit
1172662095
2 changed files with 48 additions and 20 deletions
19
ct/omada.sh
19
ct/omada.sh
|
@ -27,18 +27,31 @@ function update_script() {
|
|||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating MongoDB"
|
||||
MONGODB_VERSION="8.0"
|
||||
if ! lscpu | grep -q 'avx'; then
|
||||
MONGODB_VERSION="4.4"
|
||||
fi
|
||||
|
||||
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y --only-upgrade mongodb-org
|
||||
msg_ok "Updated MongoDB to $MONGODB_VERSION"
|
||||
|
||||
msg_info "Updating Omada Controller"
|
||||
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."
|
||||
exit
|
||||
fi
|
||||
echo -e "Updating Omada Controller"
|
||||
|
||||
wget -qL ${latest_url}
|
||||
dpkg -i ${latest_version}
|
||||
rm -rf ${latest_version}
|
||||
echo -e "Updated Omada Controller"
|
||||
exit
|
||||
msg_ok "Updated Omada Controller"
|
||||
}
|
||||
|
||||
start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue