📅  最后修改于: 2022-03-11 14:57:45.702000             🧑  作者: Mango
#!/bin/bash
echo "Starting replica set initialize"
until mongo --host mongodb1 --eval "print(\"waited for connection\")"
do
sleep 2
done
echo "Connection finished"
echo "Creating replica set"
mongo --host mongodb1 <