mirror of
https://github.com/linuxserver/docker-bookstack.git
synced 2026-02-20 02:30:30 +08:00
skip mysql endpoint check if DB_HOST is empty
also formatted "do" and "then" in this section for style consistency
This commit is contained in:
parent
9de3d96b76
commit
0c38f97b08
@ -57,9 +57,11 @@ fi
|
||||
|
||||
# check for the mysql endpoint for 30 seconds
|
||||
END=$((SECONDS+30))
|
||||
while [ ${SECONDS} -lt ${END} ]; do
|
||||
while [ ${SECONDS} -lt ${END} ] && [ "${DB_HOST}" ];
|
||||
do
|
||||
/usr/bin/nc -z ${DB_HOST} 3306 && \
|
||||
if [ ! -z "$(/usr/bin/nc -w1 ${DB_HOST} 3306)" ]; then
|
||||
if [ ! -z "$(/usr/bin/nc -w1 ${DB_HOST} 3306)" ];
|
||||
then
|
||||
[ ! -z "${RUN}" ] && break
|
||||
RUN="RAN"
|
||||
# we sleep here again due to first run init on DB containers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user