Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

A simple shell script to wait for processes to come up

Notifications You must be signed in to change notification settings

depop-archive/archived-wait-for-it

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

IMPORTANT

This relies on a bash shell, without this you cannot utilise this utility. If you are using alpine container builds then add bash

apk add bash

WHY bash?

Well we could netcat, but then we're stuck in sh shell hell where we have to use dynamic variable names for arrays.

Usage

wait-for-it.sh host:port [host:port] [-t timeout] [-- command args]
-t TIMEOUT                  Timeout in seconds, zero for no timeout
-- COMMAND ARGS             Execute command with args after the test finishes

Example

./wait-for-it.sh www.google.com:80 www.yahoo.com:80 -t 5 -- echo "hello world"
Connection to www.google.com port 80 [tcp/http] succeeded!
Connection to www.yahoo.com port 80 [tcp/http] succeeded!
hello world

About

A simple shell script to wait for processes to come up

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages