From fd8a1d518ec8047b38c211cf47f02bcc14907082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Tue, 24 Jan 2023 23:45:34 +0100 Subject: [PATCH] Installing buster only for 4.4 --- scripts/ynh_mongo_db__2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index c475ef2..37bf15d 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -318,7 +318,11 @@ ynh_install_mongo() { if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then ynh_print_error --message="The version of Mongo you're trying to install may not be compatible with your cpu (Missing avx instruction set)." - fi + fi + if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" == "4.4" ]]; then + ynh_print_warn --message="Installing Mongo for Buster due to incompatible cpu." + mongo_debian_release=buster + fi ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod