From 8212a44e5fe780026cbc986a5a5eec0d3f2ed725 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 21 Dec 2025 23:13:46 +0100 Subject: [PATCH] unifi: remove mongodb 4.4 support | bump to java 21 (#10206) * unifi: remove mongodb support | bump to java 21 * bump java 21 --- ct/unifi.sh | 2 ++ install/unifi-install.sh | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ct/unifi.sh b/ct/unifi.sh index c826c0c66..578d1dbb2 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -28,6 +28,8 @@ function update_script() { exit fi + JAVA_VERSION="21" setup_java + msg_info "Updating ${APP}" $STD apt update --allow-releaseinfo-change $STD apt install -y unifi diff --git a/install/unifi-install.sh b/install/unifi-install.sh index f3b1eb8d6..83cd69dbb 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt install -y apt-transport-https msg_ok "Installed Dependencies" -JAVA_VERION="17" setup_java setup_deb822_repo \ "unifi" \ "https://dl.ui.com/unifi/unifi-repo.gpg" \ @@ -26,17 +25,22 @@ setup_deb822_repo \ "ubiquiti" \ "amd64" -if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then - msg_warn "No AVX Support Detected. MongoDB v4.4 will be installed" - if ! dpkg -l | grep -q "libssl1.1"; then - curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb" -o "libssl1.1_1.1.1w-0+deb11u4_amd64.deb" - $STD dpkg -i libssl1.1_1.1.1w-0+deb11u4_amd64.deb - fi - MONGO_VERSION="4.4" setup_mongodb +JAVA_VERSION="21" setup_java + +if lscpu | grep -q 'avx'; then + MONGO_VERSION="8.0" setup_mongodb else - MONGO_VERSION="7.0" setup_mongodb + msg_error "No AVX detected (CPU-Flag)! We have discontinued support for this. You are welcome to try it manually with a Debian LXC, but due to the many issues with Unifi, we currently only support AVX CPUs." + exit 10 +fi + +if ! dpkg -l | grep -q 'libssl1.1'; then + msg_info "Installing libssl (if needed)" + curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb" -o "/tmp/libssl.deb" + $STD dpkg -i /tmp/libssl.deb + rm -f /tmp/libssl.deb + msg_ok "Installed libssl1.1" fi -msg_ok "Installed MongoDB" msg_info "Installing UniFi Network Server" $STD apt install -y unifi