mirror of
https://github.com/bigbluebutton/docker.git
synced 2024-12-04 22:11:30 +01:00
61676a042d
necessary for query.observerChanges to work probably with changes to mongodb via a different client. Otherwise some events are missing due to a fallback via polling, which leads to lost state updates in the meantime. took me now 3 days to debug.... :'D
16 lines
308 B
Bash
Executable File
16 lines
308 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
|
|
host=${HOSTNAME:-$(hostname -f)}
|
|
|
|
# init replset with defaults
|
|
mongo local --eval "rs.initiate({
|
|
_id: 'rs0',
|
|
members: [ { _id: 0, host: '127.0.0.1:27017' } ]
|
|
})"
|
|
|
|
echo "Waiting to become a master"
|
|
echo 'while (!db.isMaster().ismaster) { sleep(100); }' | mongo
|
|
|
|
echo "I'm the master!" |