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
|
<html>
<head>
<title>svwaitdown(8) manual page</title>
</head>
<body bgcolor='white'>
<a href='http://smarden.org/pape/'>G. Pape</a><br><a href='index.html'>runit</A><hr><p>
<h2><a name='sect0'>Name</a></h2>
svwaitdown - waits for services controlled by <i>runsv(8)</i> to be down
<h2><a name='sect1'>Synopsis</a></h2>
<b>svwaitdown</b>
[ <b>-v</b> ] [ <b>-k</b> ] [ <b>-t</b> <i>sec</i> ] <i>services</i>
<h2><a name='sect2'>Description</a></h2>
<i>services</i> consists of one or more
arguments, each argument naming a service directory. <p>
<b>svwaitdown</b> sends each
<i>service</i> given at the command line the ‘‘down’’ command, and waits for it to
become down. The <i>services</i> given at the command line must be controlled by
<i><b>runsv</b>(8)</i>. <p>
<b>svwaitdown</b> blocks, limited by a <i>timeout</i>, until all <i>services</i> are
down or reports errors.
<h2><a name='sect3'>Options</a></h2>
<dl>
<dt><b>-v</b> </dt>
<dd>verbose. Print verbose messages to stderr.
</dd>
<dt><b>-t <i>sec</b> </i></dt>
<dd>Set the timeout for waiting for <i>services</i> to become down to <i>sec</i> seconds.
<i>sec</i> must be between 1 and 6000. Default is 600 (10 minutes). </dd>
<dt><b>-k</b> </dt>
<dd>Kill. If the
timeout is reached before all <i>services</i> are down, tell the <i><b>runsv</b>(8)</i> processes
to send the <i>services</i> a KILL signal. </dd>
<dt><b>-x</b> </dt>
<dd>Exit. Send each <i>service</i> the ‘‘exit’’ command
additionally to the ‘‘down’’ command, and wait for the corresponding <i><b>runsv</b>(8)</i>
processes to exit instead for the <i>services</i> to be down. </dd>
</dl>
<h2><a name='sect4'>Exit Codes</a></h2>
<b>svwaitdown</b>
returns 0 as soon as all <i>services</i> are down. <p>
If a <i>service</i> is usually controlled
by <i><b>runsv (8)</i>,</b> but no supervisor process is currently running in the directory,
<b>svwaitdown</b> treats this <i>service</i> as if it would be down. <p>
For each <i>service</i>
that causes an error while checking, <b>svwaitdown</b> increases the exit code
by one and exits non zero. The maximum is 100. <p>
<b>svwaitdown</b> returns 111 on
error, or if the timeout <i>sec</i> was reached.
<h2><a name='sect5'>See Also</a></h2>
<i>sv(8)</i>, <i>runsv(8)</i>, <i>chpst(8)</i>,
<i>svlogd(8)</i>, <i>runit(8)</i>, <i>runit-init(8)</i>, <i>runsvdir(8)</i>, <i>runsvchdir(8)</i>, <i>svwaitup(8)</i>
<p>
<i>http://smarden.org/runit/</i>
<h2><a name='sect6'>Author</a></h2>
Gerrit Pape <pape@smarden.org> <p>
<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Options</a></li>
<li><a name='toc4' href='#sect4'>Exit Codes</a></li>
<li><a name='toc5' href='#sect5'>See Also</a></li>
<li><a name='toc6' href='#sect6'>Author</a></li>
</ul>
</body>
</html>
|