waitport.1 (912B) download
1.TH waitport 1
2.SH NAME
3waitport \- wait for a local TCP service to show up
4.SH SYNOPSIS
5.B waitport port command ...
6
7.B waitport ip/port command ...
8
9.SH DESCRIPTION
10.B waitport
11will repeatedly do what netstat does (go through /proc/net/tcp and
12/proc/net/tcp6) and look for a specific TCP port in LISTEN state to show
13up. When that happens, it will run the rest of the command line.
14
15There is a timeout after 1000 tries (10 tries per second). If the port
16does not show up by then, waitport will abort with a non-zero exit code.
17
18This program is meant for use with minit, when one service starts a
19service, and another program should only be started once the first
20service has bound to the port (i.e. is accepting connections).
21
22Use waitport to resolve race conditions in dependency chains in minit.
23
24.SH AUTHOR
25waitport was written by Felix von Leitner and can be downloaded from
26.I http://www.fefe.de/minit/
27