mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-03 18:02:50 +00:00
omada: fix update script with mongodb 8 (#8724)
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
16
ct/omada.sh
16
ct/omada.sh
@@ -29,19 +29,13 @@ function update_script() {
|
||||
fi
|
||||
|
||||
msg_info "Updating MongoDB"
|
||||
MONGODB_VERSION="7.0"
|
||||
if ! lscpu | grep -q 'avx'; then
|
||||
MONGODB_VERSION="4.4"
|
||||
msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/"
|
||||
exit
|
||||
if lscpu | grep -q 'avx'; then
|
||||
MONGO_VERSION="8.0" setup_mongodb
|
||||
else
|
||||
msg_warn "No AVX detected: Using older MongoDB 4.4"
|
||||
MONGO_VERSION="4.4" setup_mongodb
|
||||
fi
|
||||
|
||||
curl -fsSL "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 update
|
||||
$STD apt install -y --only-upgrade mongodb-org
|
||||
msg_ok "Updated MongoDB to $MONGODB_VERSION"
|
||||
|
||||
msg_info "Checking if right Azul Zulu Java is installed"
|
||||
java_version=$(java -version 2>&1 | awk -F[\"_] '/version/ {print $2}')
|
||||
if [[ "$java_version" =~ ^1\.8\.* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user