summary refs log tree commit diff
path: root/man/svwaitdown.8
blob: e224b3ca1fd3cdd112b8846661c287ab8591f9b2 (plain) (blame)
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
.TH svwaitdown 8
.SH NAME
svwaitdown \- waits for services controlled by runsv(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 argument naming a service directory.
.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).
.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 1 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.
.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),
but no supervisor process is currently running in the directory,
.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 on error, or if the timeout
.I sec
was reached.
.SH SEE ALSO
sv(8),
runsv(8),
chpst(8),
svlogd(8),
runit(8),
runit-init(8),
runsvdir(8),
runsvchdir(8),
svwaitup(8)
.P
http://smarden.org/runit/
.SH AUTHOR
Gerrit Pape <pape@smarden.org>