diff --git a/README.md b/README.md index 6cb24ea..13c9a1b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Dont-code Services for YunoHost -[![Integration level](https://dash.yunohost.org/integration/dont-code.svg)](https://dash.yunohost.org/appci/app/dont-code) ![Working status](https://ci-apps.yunohost.org/ci/badges/dont-code.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/dont-code.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/dont-code.svg)](https://dash.yunohost.org/appci/app/dont-code) ![Working status](https://ci-apps.yunohost.org/ci/badges/dont-code.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/dont-code.maintain.svg) [![Install Dont-code Services with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dont-code) *[Lire ce readme en français.](./README_fr.md)* @@ -31,7 +31,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Shipped version:** 0.2~ynh2 +**Shipped version:** 0.2~ynh3 **Demo:** https://dont-code.net/apps.html diff --git a/README_fr.md b/README_fr.md index 4a89a34..9e2a6d6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Dont-code Services pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/dont-code.svg)](https://dash.yunohost.org/appci/app/dont-code) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/dont-code.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/dont-code.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/dont-code.svg)](https://dash.yunohost.org/appci/app/dont-code) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/dont-code.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/dont-code.maintain.svg) [![Installer Dont-code Services avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dont-code) *[Read this readme in english.](./README.md)* @@ -31,7 +31,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Version incluse :** 0.2~ynh2 +**Version incluse :** 0.2~ynh3 **Démo :** https://dont-code.net/apps.html diff --git a/check_process b/check_process index ae4401e..240a9c5 100644 --- a/check_process +++ b/check_process @@ -12,10 +12,10 @@ setup_sub_dir=1 setup_root=1 setup_nourl=0 - setup_private=0 + setup_private=1 setup_public=1 - upgrade=0 - upgrade=0 from_commit=CommitHash + upgrade=1 + upgrade=1 from_commit=7852cc4bf44ff20ee51fe35f3f53dc105e0f6d79 backup_restore=1 multi_instance=0 port_already_use=1 (8083) @@ -24,6 +24,6 @@ Email=ger@shared.collin.best Notification=Down ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=7852cc4bf44ff20ee51fe35f3f53dc105e0f6d79 + name=2023-01-07 - Added Ssh support for dev. manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& diff --git a/manifest.json b/manifest.json index 673cfc0..216f2ed 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Install services and databases needed to support Dont-code platform", "fr": "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code" }, - "version": "0.2~ynh2", + "version": "0.2~ynh3", "url": "https://dont-code.net", "upstream": { "license": "AGPL-3.0-or-later", diff --git a/scripts/upgrade b/scripts/upgrade index dcc12f7..fab7b44 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,8 +128,6 @@ ynh_install_java --java_version=$java_version --jdk_type=jre ynh_install_app_dependencies $pkg_dependencies -ynh_print_info --message="Debian release is $(ynh_get_debian_release)" - # Install the required version of Mongo ynh_install_mongo --mongo_version=$mongo_version diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index f1acafa..e1c17a6 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -313,14 +313,25 @@ ynh_install_mongo() { mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" ynh_print_info --message="Installing MongoDB Community Edition ..." - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $(ynh_get_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" + local mongo_debian_release=$(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 + + 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 # Make sure MongoDB is started and enabled systemctl enable $mongodb_servicename --quiet systemctl daemon-reload --quiet - ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60 + ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" # Integrate MongoDB service in YunoHost yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log"