Skip to content

Commit 1d78eae

Browse files
committed
chore: remove excessive logging
1 parent 64852f5 commit 1d78eae

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

start-mongodb.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,9 @@ if [ -z "$MONGODB_REPLICA_SET" ]; then
104104
fi
105105

106106
# For replica set mode:
107-
# If auth (username/password) is requested, ensure mongodb-key is provided
107+
# If auth (username/password) is requested, ensure mongodb-key is provided, otherwise generate random
108108
if { [ -n "$MONGODB_USERNAME" ] || [ -n "$MONGODB_PASSWORD" ]; } && [ -z "$MONGODB_KEY" ]; then
109-
echo ""
110-
echo "The input [mongodb-key] is required when using [mongodb-username] or [mongodb-password] with a replica set."
111-
echo "Generating random 'mongodb-key'."
112-
echo ""
113-
MONGODB_KEY=$(dd if=/dev/urandom bs=756 count=1 2>/dev/null | base64 | tr -d '\n')
109+
MONGODB_KEY=$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | base64 | tr -d '\n')
114110
fi
115111

116112
echo "::group::Starting MongoDB as single-node replica set"

0 commit comments

Comments
 (0)