diff --git a/install.sh b/install.sh index a0640ce..025f1fb 100644 --- a/install.sh +++ b/install.sh @@ -68,13 +68,22 @@ check_os_version() { if [[ "$os_name" == "ubuntu" && $(echo "$os_version >= 22" | bc) -eq 1 ]] || [[ "$os_name" == "debian" && $(echo "$os_version >= 12" | bc) -eq 1 ]]; then log_success "OS check passed: $os_name $os_version" - return 0 else log_error "This script is only supported on Ubuntu 22+ or Debian 12+." exit 1 fi + + log_info "Checking CPU for AVX support (required for MongoDB)..." + if grep -q -m1 -o -E 'avx|avx2|avx512' /proc/cpuinfo; then + log_success "CPU supports AVX instruction set." + else + log_error "CPU does not support the required AVX instruction set for MongoDB." + log_error "Installation aborted." + exit 1 + fi } + install_mongodb() { log_info "Installing MongoDB..."