Skip to content

Instantly share code, notes, and snippets.

@dontlaugh
Created October 19, 2018 17:57
Show Gist options
  • Save dontlaugh/5f4d2c5c4b44d9525797657ef226a91a to your computer and use it in GitHub Desktop.
Save dontlaugh/5f4d2c5c4b44d9525797657ef226a91a to your computer and use it in GitHub Desktop.
scriptomundo
#!/bin/sh
# Install:
# chmod +x mongo_conn.sh
# ./mongo_conn.sh
MONGO_USER=""
MONGO_PASS=""
HOST_1="10.135.7.252"
HOST_2="10.135.4.81"
HOST_3="10.135.3.100"
REPLICA_SET="flyer-dev-shard-0"
mongo "mongodb://${HOST_1}:27017:27017,${HOST_2}:27017,${HOST_3}:27017/test?replicaSet=${REPLICA_SET}" \
--ssl --authenticationDatabase admin \
--username $MONGO_USER \
--password $MONGO_PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment