Skip to content

Commit

Permalink
Merge tag '10-missing-ping' into develop
Browse files Browse the repository at this point in the history
1.0.2
  • Loading branch information
senssei committed Sep 16, 2017
2 parents 6876848 + 65bfd22 commit 5868490
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
18 changes: 11 additions & 7 deletions scripts/init-shard.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/bash

mongodb1=`ping -c 1 ${MONGOS} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb1=`getent hosts ${MONGOS} | awk '{ print $1 }'`

mongodb11=`ping -c 1 ${MONGO11} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb12=`ping -c 1 ${MONGO12} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb13=`ping -c 1 ${MONGO13} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb11=`getent hosts ${MONGO11} | awk '{ print $1 }'`
mongodb12=`getent hosts ${MONGO12} | awk '{ print $1 }'`
mongodb13=`getent hosts ${MONGO13} | awk '{ print $1 }'`

mongodb21=`ping -c 1 ${MONGO21} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb22=`ping -c 1 ${MONGO22} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb23=`ping -c 1 ${MONGO23} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb21=`getent hosts ${MONGO21} | awk '{ print $1 }'`
mongodb22=`getent hosts ${MONGO22} | awk '{ print $1 }'`
mongodb23=`getent hosts ${MONGO23} | awk '{ print $1 }'`

mongodb31=`getent hosts ${MONGO31} | awk '{ print $1 }'`
mongodb32=`getent hosts ${MONGO32} | awk '{ print $1 }'`
mongodb33=`getent hosts ${MONGO33} | awk '{ print $1 }'`

port=${PORT:-27017}

Expand Down
6 changes: 3 additions & 3 deletions scripts/setup-cnf.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

mongodb1=`ping -c 1 ${MONGO1} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb2=`ping -c 1 ${MONGO2} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb3=`ping -c 1 ${MONGO3} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb1=`getent hosts ${MONGO1} | awk '{ print $1 }'`
mongodb2=`getent hosts ${MONGO2} | awk '{ print $1 }'`
mongodb3=`getent hosts ${MONGO3} | awk '{ print $1 }'`

port=${PORT:-27017}

Expand Down
6 changes: 3 additions & 3 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

mongodb1=`ping -c 1 ${MONGO1} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb2=`ping -c 1 ${MONGO2} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb3=`ping -c 1 ${MONGO3} | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
mongodb1=`getent hosts ${MONGO1} | awk '{ print $1 }'`
mongodb2=`getent hosts ${MONGO2} | awk '{ print $1 }'`
mongodb3=`getent hosts ${MONGO3} | awk '{ print $1 }'`

port=${PORT:-27017}

Expand Down

0 comments on commit 5868490

Please sign in to comment.