display database port in status messages

This commit is contained in:
Sameer Naik 2017-01-16 10:25:25 +05:30
parent d2785a275b
commit 6afd24a1df
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ __wait_for_db() {
local port=$2
local ip_address=$(getent hosts $1 | awk '{ print $1 }')
log "Connecting to at $host server at $ip_address"
log "Connecting to at $host server at $ip_address:$port"
counter=0
until nc -z $ip_address $port; do
@ -36,7 +36,7 @@ __wait_for_db() {
log "Error: Couldn't connect to $host server."
return 1
fi
log "Trying to connect to $host server at $ip_address. Attempt $counter."
log "Trying to connect to $host server at $ip_address:$port. Attempt $counter."
sleep 5
done
log "Connected to $host server"