Spaces:
Runtime error
Runtime error
hop
Browse files
start.sh
CHANGED
@@ -30,7 +30,7 @@ echo "MongoDB started successfully"
|
|
30 |
# Initialize replica set
|
31 |
echo "Initializing replica set..."
|
32 |
mongosh --eval 'rs.status()' --quiet
|
33 |
-
if ! mongosh --eval 'rs.status()' --quiet | grep -q 'ok
|
34 |
echo "Initializing replica set..."
|
35 |
mongosh --eval 'rs.initiate({_id: "rs01", members: [{_id: 0, host: "localhost:27017"}]})' || {
|
36 |
echo "Failed to initialize replica set"
|
|
|
30 |
# Initialize replica set
|
31 |
echo "Initializing replica set..."
|
32 |
mongosh --eval 'rs.status()' --quiet
|
33 |
+
if ! mongosh --eval 'rs.status()' --quiet | grep -q 'ok: 1'; then
|
34 |
echo "Initializing replica set..."
|
35 |
mongosh --eval 'rs.initiate({_id: "rs01", members: [{_id: 0, host: "localhost:27017"}]})' || {
|
36 |
echo "Failed to initialize replica set"
|