1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dont-code_ynh.git synced 2024-09-03 18:26:34 +02:00

trying to install alternative mongo 4.4

This commit is contained in:
Gérard Collin 2023-07-16 10:00:44 +02:00
parent 89b649ed2e
commit 5d9cf5a4ee
2 changed files with 6 additions and 4 deletions

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
java_version=17 java_version=17
mongo_version=6.0 mongo_version=4.4
# Java dependencies used by the app will be installed through the Java helper # Java dependencies used by the app will be installed through the Java helper
pkg_dependencies="" pkg_dependencies=""

View file

@ -314,17 +314,19 @@ ynh_install_mongo() {
ynh_print_info --message="Installing MongoDB Community Edition ..." ynh_print_info --message="Installing MongoDB Community Edition ..."
local mongo_debian_release=$(ynh_get_debian_release) local mongo_debian_release=$(ynh_get_debian_release)
local mongo_packages="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh"
if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then 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)." 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" mongo_version="4.4"
fi fi
if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then if [[ "$mongo_version" == "4.4" ]]; then
ynh_print_warn --message="Keeping $mongo_debian_release install for Mongo 4.4 to see if that works." ynh_print_warn --message="Switching to special package install for Mongo 4.4 to see if that works."
#mongo_debian_release=buster #mongo_debian_release=buster
mongo_packages="mongodb-mongosh-shared-openssl3"
fi 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" ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package=$mongo_packages --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc"
mongodb_servicename=mongod mongodb_servicename=mongod
# Make sure MongoDB is started and enabled # Make sure MongoDB is started and enabled