Skip to content

Commit

Permalink
Update install_mongodb.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu authored Jan 30, 2025
1 parent 966d687 commit 3b3fd73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install_mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ if [[ $1 == "--auto-create" ]]; then
sudo sed -i 's/bindIp:.*/bindIp: 0.0.0.0/g' /etc/mongod.conf
sudo systemctl restart mongod

echo "MongoDB username: $username"
echo "MongoDB password: $password"
echo "MongoDB username: $username" > /tmp/mongo_credentials.txt
echo "MongoDB password: $password" >> /tmp/mongo_credentials.txt

echo "MongoDB credentials saved to /tmp/mongo_credentials.txt"
else
# Start MongoDB without authentication
sudo sed -i 's/bindIp:.*/bindIp: 0.0.0.0/g' /etc/mongod.conf
Expand Down

0 comments on commit 3b3fd73

Please sign in to comment.