From dd9e249b63f4a954b80117f5bd61e5b46fb093e1 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:42:46 +0100 Subject: [PATCH] Update _common.sh --- scripts/_common.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b83e7f8..791c2b3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,4 +1,5 @@ #!/bin/bash + #================================================= # COMMON VARIABLES #================================================= @@ -183,10 +184,10 @@ ynh_mongo_create_user() { ynh_handle_getopts_args "$@" # Create the user and set the user as admin of the db - ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' + ynh_mongo_exec --database="$db_name" --command='db.createUser( { user: "'${db_user}'", pwd: "'${db_pwd}'", roles: [ { role: "readWrite", db: "'${db_name}'" } ] } );' # Add clustermonitoring rights - ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' + ynh_mongo_exec --database="$db_name" --command='db.grantRolesToUser("'${db_user}'",[{ role: "clusterMonitor", db: "admin" }]);' } # Check if a mongo database exists