mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-05 18:13:50 +00:00
Anytype-server: wait for MongoDB readiness before rs.initiate() (#13165)
This commit is contained in:
committed by
GitHub
parent
55324dbb98
commit
6cc2c26573
@@ -22,7 +22,12 @@ replication:
|
|||||||
replSetName: "rs0"
|
replSetName: "rs0"
|
||||||
EOF
|
EOF
|
||||||
systemctl restart mongod
|
systemctl restart mongod
|
||||||
sleep 3
|
for i in $(seq 1 30); do
|
||||||
|
if mongosh --quiet --eval "db.adminCommand('ping')" &>/dev/null; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
$STD mongosh --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "127.0.0.1:27017"}]})'
|
$STD mongosh --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "127.0.0.1:27017"}]})'
|
||||||
msg_ok "Configured MongoDB Replica Set"
|
msg_ok "Configured MongoDB Replica Set"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user