Skip to content

Commit

Permalink
Fix typo run script (#2)
Browse files Browse the repository at this point in the history
* Fix typo run script

* Minor refactor script
  • Loading branch information
Adriaan Molendijk authored Mar 25, 2022
1 parent bd5763b commit cfcfab5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ MongoDB does not provide any sample databases on their website, However, they do
```bash
docker pull mvertes/alpine-mongo

docker run -d --name mongo -p 2717:27017 -v ~/mongodb:/data/db mvertes/alpine-mongo
docker run -d --name mongo -p 2717:27017 -v ~/mongodb:/data/db mvertes/alpine-mongo

# args
# hostname
# port
./script localhost 2717
./script.sh localhost 2717

# start mongo shell
docker exec -ti mongo mongo
docker exec -it mongo mongo
```

10 changes: 4 additions & 6 deletions script.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
###########################################################
# Ussage ( * = optional ): #
# ./script <db-address> <db-port> *<username> *<password> #
###########################################################
##############################################################
# Usage ( * = optional ): #
# ./script.sh <db-address> <db-port> *<username> *<password> #
##############################################################

if [ ! -z "$3" ]; then
if [ ! -z "$4" ]; then
Expand All @@ -11,8 +11,6 @@ if [ ! -z "$3" ]; then
fi
fi

#echo $auth

for coll in *; do
if [ -d "${coll}" ] ; then
echo "$coll"
Expand Down

0 comments on commit cfcfab5

Please sign in to comment.