mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
commit
f087c9b9a9
2 changed files with 19 additions and 16 deletions
|
@ -7,7 +7,7 @@
|
||||||
"fr": "Un kanban similaire à Trello"
|
"fr": "Un kanban similaire à Trello"
|
||||||
},
|
},
|
||||||
"version": "5.35~ynh1",
|
"version": "5.35~ynh1",
|
||||||
"url": "https://wekan.io",
|
"url": "https://wekan.github.io",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"website": "https://wekan.github.io",
|
"website": "https://wekan.github.io",
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
MONGO_SERVICENAME_STRETCH="mongodb"
|
MONGO_DEBIAN_SERVICENAME="mongodb"
|
||||||
MONGO_SERVICENAME_BUSTER="mongod"
|
MONGO_CE_SERVICENAME="mongod"
|
||||||
MONGO_DEPENDENCIES_STRETCH="mongodb mongodb-server mongo-tools"
|
MONGO_DEBIAN_DEPENDENCIES="mongodb mongodb-server mongo-tools"
|
||||||
MONGO_DEPENDENCIES_BUSTER="mongodb-org mongodb-org-server mongodb-org-tools"
|
MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools"
|
||||||
MONGO_CONFIG_STRETCH="/etc/mongodb.conf"
|
MONGO_DEBIAN_CONFIG="/etc/mongodb.conf"
|
||||||
MONGO_CONFIG_BUSTER="/etc/mongod.conf"
|
MONGO_CE_CONFIG="/etc/mongod.conf"
|
||||||
MONGO_REPO_BUSTER="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main"
|
MONGO_CE_REPO="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_CE_KEY="https://www.mongodb.org/static/pgp/server-4.4.asc"
|
||||||
|
|
||||||
# Execute a mongo command
|
# Execute a mongo command
|
||||||
#
|
#
|
||||||
|
@ -310,12 +310,15 @@ ynh_install_mongo() {
|
||||||
ynh_print_info --message="Installing MongoDB..."
|
ynh_print_info --message="Installing MongoDB..."
|
||||||
|
|
||||||
# Define Mongo Service Name
|
# Define Mongo Service Name
|
||||||
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
if dpkg --compare-versions $(cat /etc/debian_version) ge 10.0
|
||||||
ynh_install_extra_app_dependencies --repo="$MONGO_REPO_BUSTER" --package="$MONGO_DEPENDENCIES_BUSTER" --key="$MONGO_KEY_BUSTER"
|
then
|
||||||
MONGODB_SERVICENAME=$MONGO_SERVICENAME_BUSTER
|
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
|
else
|
||||||
ynh_install_app_dependencies $MONGO_DEPENDENCIES_STRETCH
|
ynh_print_info --message="Installing MongoDB Debian..."
|
||||||
MONGODB_SERVICENAME=$MONGO_SERVICENAME_STRETCH
|
ynh_install_app_dependencies $MONGO_DEBIAN_DEPENDENCIES
|
||||||
|
MONGODB_SERVICENAME=$MONGO_DEBIAN_SERVICENAME
|
||||||
fi
|
fi
|
||||||
mongodb_servicename=$MONGODB_SERVICENAME
|
mongodb_servicename=$MONGODB_SERVICENAME
|
||||||
|
|
||||||
|
@ -341,9 +344,9 @@ ynh_remove_mongo() {
|
||||||
ynh_print_info --message="Removing MongoDB service..."
|
ynh_print_info --message="Removing MongoDB service..."
|
||||||
# Define Mongo Service Name
|
# Define Mongo Service Name
|
||||||
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||||
MONGODB_SERVICENAME=$MONGO_SERVICENAME_BUSTER
|
MONGODB_SERVICENAME=$MONGO_CE_SERVICENAME
|
||||||
else
|
else
|
||||||
MONGODB_SERVICENAME=$MONGO_SERVICENAME_STRETCH
|
MONGODB_SERVICENAME=$MONGO_DEBIAN_SERVICENAME
|
||||||
fi
|
fi
|
||||||
# Remove the mongodb service
|
# Remove the mongodb service
|
||||||
yunohost service remove $MONGODB_SERVICENAME
|
yunohost service remove $MONGODB_SERVICENAME
|
||||||
|
|
Loading…
Reference in a new issue