1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
.TH svwaitdown 8
.SH NAME
svwaitdown \- waits for services controlled by runsv(8) or supervise(8) to be down
.SH SYNOPSIS
.B svwaitdown
[
.B \-v
] [
.B \-k
] [
.B \-t
.I sec
]
.I services
.SH DESCRIPTION
.I services
consists of one or more arguments. Each
.I service
directory must start with a slash.
.P
.B svwaitdown
sends each
.I service
given at the command line the ``down'' command, and waits for it to become
down.
The
.I services
given at the command line must be controlled by
.BR runsv (8),
or
.BR supervise (8).
.P
.B svwaitdown
blocks, limited by a
.IR timeout ,
until all
.I services
are down or reports errors.
.SH OPTIONS
.TP
.B \-v
verbose. Print verbose messages to stderr.
.TP
.B \-t \fIsec
Set the timeout for waiting for
.I services
to become down to
.I sec
seconds.
.I sec
must be between 2 and 6000. Default is 600 (10 minutes).
.TP
.B \-k
Kill. If the timeout is reached before all
.I services
are down, tell the
.BR runsv (8)
processes to send the
.I services
a KILL signal.
.TP
.B \-x
Exit. Send each
.I service
the ``exit'' command additionally to the ``down'' command, and wait for the
corresponding
.BR runsv (8)
processes to exit instead for the
.I services
to be down.
This option should only be used by
.BR runit (8)
in stage 3 when
.BR runsvdir (8)
is already stopped.
.SH EXIT CODES
.B svwaitdown
returns 0 as soon as all
.I services
are down.
.P
If a
.I service
is usually controlled by
.B runsv (8)
or
.BR supervise (8),
but no supervisor process is currently running,
.B svwaitdown
treats this
.I service
as if it would be down.
.P
For each
.I service
that causes an error while checking,
.B svwaitdown
increases the exit code by one and exits non zero.
The maximum is 100.
.P
.B svwaitdown
returns 111 if the timeout
.I sec
was reached.
.SH SEE ALSO
svwaitup(8),
runsv(8),
runsvctrl(8),
runsvstat(8),
chpst(8),
svlogd(8),
runit(8),
runit-init(8),
runsvdir(8),
runsvchdir(8),
utmpset(8)
.P
http://smarden.org/runit/
http://cr.yp.to/daemontools.html
.SH AUTHOR
Gerrit Pape <pape@smarden.org>
|