From 5ece985195d6f11589141d36e83c806d3c54345a Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 5 May 2024 10:02:18 +0200 Subject: [PATCH] fix mongo --- scripts/_common.sh | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 97417a8..9cf9bfa 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -326,32 +326,9 @@ ynh_install_mongo() { ynh_handle_getopts_args "$@" mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" - ynh_print_info --message="Installing MongoDB Community Edition..." - local mongo_debian_release=bullseye #$(ynh_get_debian_release) - - if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then - ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your CPU (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." - mongo_version="4.4" - fi - - if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then - ynh_print_warn --message="Switched to Buster install as Mongo 4.4 is not compatible with $mongo_debian_release." - mongo_debian_release=buster - fi - - if [ "$mongo_debian_release" == buster ] ; then - ubuntu_version="bionic" - elif [ "$mongo_debian_release" == bullseye ] ; then - ubuntu_version="focal" - elif [ "$mongo_debian_release" == bookworm ] ; then - ubuntu_version="jammy" - fi - - ynh_install_extra_app_dependencies \ - --repo="deb https://repo.mongodb.org/apt/ubuntu $ubuntu_version/mongodb-org/$mongo_version multiverse" \ - --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 + ynh_print_info --message="Installing MongoDB Community Edition..." + ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian buster/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 # Make sure MongoDB is started and enabled systemctl enable $mongodb_servicename --quiet