File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
root/etc/s6-overlay/s6-rc.d/init-speedtest-tracker-config Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,11 @@ elif [[ "${DB_CONNECTION}" = "mysql" ]]; then
2727 END=$((SECONDS + 30))
2828 while [[ ${SECONDS} -lt ${END} ]] && [[ -n "${DB_HOST+x}" ]]; do
2929 if [[ $(/usr/bin/nc -w1 "${DB_HOST}" "${DB_PORT}" | tr -d '\0') ]]; then
30- if [[ -n "${RUN}" ]]; then
31- break
32- fi
33- RUN="RAN"
34- # we sleep here again due to first run init on DB containers
3530 if [[ ! -f /dbwait.lock ]]; then
3631 sleep 5
3732 fi
33+ touch /dbwait.lock
34+ break
3835 else
3936 sleep 1
4037 fi
@@ -44,14 +41,11 @@ elif [[ "${DB_CONNECTION}" = "pgsql" ]]; then
4441 END=$((SECONDS + 30))
4542 while [[ ${SECONDS} -lt ${END} ]] && [[ -n "${DB_HOST+x}" ]]; do
4643 if pg_isready -h "${DB_HOST}" -p "${DB_PORT}" -q; then
47- if [[ -n "${RUN}" ]]; then
48- break
49- fi
50- RUN="RAN"
51- # we sleep here again due to first run init on DB containers
5244 if [[ ! -f /dbwait.lock ]]; then
5345 sleep 5
5446 fi
47+ touch /dbwait.lock
48+ break
5549 else
5650 sleep 1
5751 fi
You can’t perform that action at this time.
0 commit comments