mirror of
https://github.com/bitnami/containers.git
synced 2026-03-12 06:48:14 +08:00
Merge pull request #7 from sameersbn/use-nc
use `nc` for database server connection test
This commit is contained in:
@@ -19,7 +19,7 @@ wait_for_db() {
|
|||||||
mariadb_address=$(getent hosts mariadb | awk '{ print $1 }')
|
mariadb_address=$(getent hosts mariadb | awk '{ print $1 }')
|
||||||
counter=0
|
counter=0
|
||||||
log "Connecting to mariadb at $mariadb_address"
|
log "Connecting to mariadb at $mariadb_address"
|
||||||
while ! curl --silent mariadb:3306 >/dev/null; do
|
while ! nc -z mariadb 3306; do
|
||||||
counter=$((counter+1))
|
counter=$((counter+1))
|
||||||
if [ $counter == 30 ]; then
|
if [ $counter == 30 ]; then
|
||||||
log "Error: Couldn't connect to mariadb."
|
log "Error: Couldn't connect to mariadb."
|
||||||
|
|||||||
Reference in New Issue
Block a user