Skip to content

Commit

Permalink
Set default WAITFOR TIMEOUT
Browse files Browse the repository at this point in the history
  • Loading branch information
t7tran committed Jul 20, 2023
1 parent 43d0faf commit 7c132bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rootfs/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ if [[ -f "$CERTIFICATE" && -f "$CERTIFICATE_KEY" && -n "$STORE_PASS" && -n "$KEY
rm -rf ${keystore}.p12
fi

if [[ ! -z "$WAITFOR_HOST" && ! -z "$WAITFOR_PORT" ]]; then
for (( i=1; i<=${TIMEOUT}; i++ )); do nc -zw1 $WAITFOR_HOST $WAITFOR_PORT && break || sleep 1; done
if [[ -n "$WAITFOR_HOST" && -n "$WAITFOR_PORT" ]]; then
for (( i=1; i<=${TIMEOUT:-30}; i++ )); do nc -zw1 $WAITFOR_HOST $WAITFOR_PORT && break || sleep 1; done
fi

var_dir() {
Expand Down

0 comments on commit 7c132bf

Please sign in to comment.