bastion: move to mongodb6 + python2 -> 3 + set mongodb to use always the same log file

This commit is contained in:
Quinten
2022-12-18 10:57:10 +01:00
committed by GitHub
parent a7c48061ba
commit 7d739dac17
2 changed files with 5 additions and 5 deletions

View File

@@ -10,10 +10,10 @@ MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/
echo -e ":/home/container$ ${MODIFIED_STARTUP}"
# start mongo
mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log && until nc -z -v -w5 127.0.0.1 27017; do echo 'Waiting for mongodb connection...'; sleep 5; done
mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log --logRotate reopen --logappend && until nc -z -v -w5 127.0.0.1 27017; do echo 'Waiting for mongodb connection...'; sleep 5; done
# Run the Server
eval ${MODIFIED_STARTUP}
# stop mongo
mongo --eval \"db.getSiblingDB('admin').shutdownServer()\
mongo --eval "db.getSiblingDB('admin').shutdownServer()"