From 4f9220d7be3340dcd51dd836a7768f76a8d82723 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 13 Jun 2022 01:04:18 +0200 Subject: [PATCH] Going back to ynh_mongo_db --- scripts/backup | 2 +- scripts/install | 2 +- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- scripts/{ynh_mongo_db__2 => ynh_mongo_db} | 45 ++++++++++++++++------- 6 files changed, 37 insertions(+), 18 deletions(-) rename scripts/{ynh_mongo_db__2 => ynh_mongo_db} (84%) diff --git a/scripts/backup b/scripts/backup index 821ad88..09fc3d1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -8,7 +8,7 @@ # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh -source ../settings/scripts/ynh_mongo_db__2 +source ../settings/scripts/ynh_mongo_db source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/install b/scripts/install index de6d01b..3e2f01d 100644 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,7 @@ #================================================= source _common.sh -source ynh_mongo_db__2 +source ynh_mongo_db source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/remove b/scripts/remove index 0a3323a..3e232b9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -7,7 +7,7 @@ #================================================= source _common.sh -source ynh_mongo_db__2 +source ynh_mongo_db source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/restore b/scripts/restore index c5ca449..f10a08a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -8,7 +8,7 @@ # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh -source ../settings/scripts/ynh_mongo_db__2 +source ../settings/scripts/ynh_mongo_db source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e240fa9..7147009 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,7 @@ #================================================= source _common.sh -source ynh_mongo_db__2 +source ynh_mongo_db source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db similarity index 84% rename from scripts/ynh_mongo_db__2 rename to scripts/ynh_mongo_db index 44b7bb6..cca1338 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db @@ -1,10 +1,13 @@ #!/bin/bash +MONGO_DEBIAN_SERVICENAME="mongodb" MONGO_CE_SERVICENAME="mongod" -MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" +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/5.0 main" -MONGO_CE_KEY="https://www.mongodb.org/static/pgp/server-5.0.asc" +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 # @@ -90,7 +93,7 @@ ynh_mongo_exec() { database="" fi - mongosh --quiet --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port <