Browse Source

chg: dev: [mongo] more verbose information !minor

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
dev
Valentin Lab 5 years ago
parent
commit
d6d56fc841
  1. 13
      mongo/hooks/mongo_database-relation-joined

13
mongo/hooks/mongo_database-relation-joined

@ -44,13 +44,14 @@ out=$(ddb < <(echo "use $DBNAME";
echo "$cmd")) echo "$cmd"))
if [[ "$out" == *"\"codeName\" : \"AlreadyInitialized\""* ]]; then if [[ "$out" == *"\"codeName\" : \"AlreadyInitialized\""* ]]; then
exit 0
info "ReplicaSet already initialized."
elif [[ "$out" == *"\"ok\" : 1"* ]]; then
info "ReplicaSet initialized. "
else
err "ReplicaSet initialisation failed:"
echo "$out" >&2
exit 13
fi fi
if [[ "$out" == *"\"ok\" : 1"* ]]; then
exit 0
fi
err Replicate Set initialisation failed
echo "$out" >&2
Loading…
Cancel
Save