diff --git a/manifest.json b/manifest.json index 397966a..6a4936e 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Un kanban similaire à Trello" }, "version": "5.35~ynh1", - "url": "https://wekan.io", + "url": "https://wekan.github.io", "upstream": { "license": "MIT", "website": "https://wekan.github.io", diff --git a/scripts/ynh_mongo_db b/scripts/ynh_mongo_db index 60fc40c..cca1338 100644 --- a/scripts/ynh_mongo_db +++ b/scripts/ynh_mongo_db @@ -1,13 +1,13 @@ #!/bin/bash -MONGO_SERVICENAME_STRETCH="mongodb" -MONGO_SERVICENAME_BUSTER="mongod" -MONGO_DEPENDENCIES_STRETCH="mongodb mongodb-server mongo-tools" -MONGO_DEPENDENCIES_BUSTER="mongodb-org mongodb-org-server mongodb-org-tools" -MONGO_CONFIG_STRETCH="/etc/mongodb.conf" -MONGO_CONFIG_BUSTER="/etc/mongod.conf" -MONGO_REPO_BUSTER="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" -MONGO_KEY_BUSTER="https://www.mongodb.org/static/pgp/server-4.4.asc" +MONGO_DEBIAN_SERVICENAME="mongodb" +MONGO_CE_SERVICENAME="mongod" +MONGO_DEBIAN_DEPENDENCIES="mongodb mongodb-server mongo-tools" +MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools" +MONGO_DEBIAN_CONFIG="/etc/mongodb.conf" +MONGO_CE_CONFIG="/etc/mongod.conf" +MONGO_CE_REPO="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" +MONGO_CE_KEY="https://www.mongodb.org/static/pgp/server-4.4.asc" # Execute a mongo command # @@ -310,12 +310,15 @@ ynh_install_mongo() { ynh_print_info --message="Installing MongoDB..." # Define Mongo Service Name - if [ "$(lsb_release --codename --short)" = "buster" ]; then - ynh_install_extra_app_dependencies --repo="$MONGO_REPO_BUSTER" --package="$MONGO_DEPENDENCIES_BUSTER" --key="$MONGO_KEY_BUSTER" - MONGODB_SERVICENAME=$MONGO_SERVICENAME_BUSTER + if dpkg --compare-versions $(cat /etc/debian_version) ge 10.0 + then + ynh_print_info --message="Installing MongoDB Community Edition..." + ynh_install_extra_app_dependencies --repo="$MONGO_CE_REPO" --package="$MONGO_CE_DEPENDENCIES" --key="$MONGO_CE_KEY" + MONGODB_SERVICENAME=$MONGO_CE_SERVICENAME else - ynh_install_app_dependencies $MONGO_DEPENDENCIES_STRETCH - MONGODB_SERVICENAME=$MONGO_SERVICENAME_STRETCH + ynh_print_info --message="Installing MongoDB Debian..." + ynh_install_app_dependencies $MONGO_DEBIAN_DEPENDENCIES + MONGODB_SERVICENAME=$MONGO_DEBIAN_SERVICENAME fi mongodb_servicename=$MONGODB_SERVICENAME @@ -341,9 +344,9 @@ ynh_remove_mongo() { ynh_print_info --message="Removing MongoDB service..." # Define Mongo Service Name if [ "$(lsb_release --codename --short)" = "buster" ]; then - MONGODB_SERVICENAME=$MONGO_SERVICENAME_BUSTER + MONGODB_SERVICENAME=$MONGO_CE_SERVICENAME else - MONGODB_SERVICENAME=$MONGO_SERVICENAME_STRETCH + MONGODB_SERVICENAME=$MONGO_DEBIAN_SERVICENAME fi # Remove the mongodb service yunohost service remove $MONGODB_SERVICENAME