This commit is contained in:
BoHung Chiu 2022-09-16 11:23:46 +08:00
parent 81f4f2e917
commit b7eec97b95
1 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ if [[ $ubuntu_version =~ '14' ]]; then
sudo chown mongodb:mongodb /var/log/mongodb -R
sudo service mongod restart
sleep 10
mongo --eval "db.version()" --quiet
mongod --version
exit_code="$(echo $?)"
if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then #mongo core dump
push_messages "Mongo 3.2 core dump!"
@ -157,7 +157,7 @@ else
if [ -e /tmp/mongodb-27017.sock ]; then
push_messages "Mongo start success!"
else
mongo --eval "db.version()" --quiet
mongod --version
exit_code="$(echo $?)"
#if mongo 6 core dump, then install mongo 5
if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then
@ -191,7 +191,7 @@ else
if [ -e /tmp/mongodb-27017.sock ]; then
push_messages "Mongo start success!"
else
mongo --eval "db.version()" --quiet
mongod --version
exit_code="$(echo $?)"
#if mongo 5 core dump, then install mongo 4.4
if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then