1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00

Merge pull request #126 from YunoHost-Apps/testing

Bullseye
This commit is contained in:
yalh76 2021-07-03 11:41:33 +02:00 committed by GitHub
commit f087c9b9a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 16 deletions

View file

@ -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",

View file

@ -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