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
|
<html>
<head>
<title>runsvctrl(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>
runsvctrl - controls a service monitored by <i><b>runsv</b>(8)</i>.
<h2><a name='sect1'>Synopsis</a></h2>
<b>runsvctrl</b>
<i>command</i> <i>services</i>
<h2><a name='sect2'>Description</a></h2>
<i>services</i> consists of one or more arguments,
each argument naming a directory used by <i><b>runsv</b>(8)</i>. <i>command</i> is one of up,
down, once, pause, cont, hup, alarm, interrupt, 1, 2, term, kill, or exit.
<p>
For each <i>service</i> of <i>services</i>, <b>runsvctrl</b> sends the command <i>command</i> to the
<i>service</i>, which must be controlled by <i><b>runsv</b>(8)</i>.
<h2><a name='sect3'>Commands</a></h2>
<dl>
<dt><b>up</b> </dt>
<dd>If the service
is not running, start it. If the service stops, restart it. </dd>
<dt><b>down</b> </dt>
<dd>If the service
is running, send it a TERM signal. If ./run exits, start ./finish if it exists.
After it stops, do not restart service. </dd>
<dt><b>once</b> </dt>
<dd>If the service is not running,
start it. Do not restart it if it stops. </dd>
<dt><b>pause</b> </dt>
<dd>If the service is running,
send it a STOP signal. </dd>
<dt><b>cont</b> </dt>
<dd>If the service is running, send it a CONT signal.
</dd>
<dt><b>hup</b> </dt>
<dd>If the service is running, send it a HUP signal. </dd>
<dt><b>alarm</b> </dt>
<dd>If the service
is running, send it a ALRM signal. </dd>
<dt><b>interrupt</b> </dt>
<dd>If the service is running,
send it a INT signal. </dd>
<dt><b>quit</b> </dt>
<dd>If the service is running, send it a QUIT signal. </dd>
<dt><b>1</b> </dt>
<dd>If the service is running, send it a USR1 signal. </dd>
<dt><b>2</b> </dt>
<dd>If the service is running, send it a USR2 signal. </dd>
<dt><b>term</b> </dt>
<dd>If the service is running, send it a TERM signal.
</dd>
<dt><b>kill</b> </dt>
<dd>If the service is running, send it a KILL signal. </dd>
<dt><b>exit</b> </dt>
<dd>If the service
is running, send it a TERM signal. Do not restart the service. If the service
is down, and no log service exists, <i><b>runsv</b>(8)</i> exits. If the service is down
and a log service exists, send a TERM signal to the log service. If the
log service is down, <i><b>runsv</b>(8)</i> exits. This command is ignored if it is given
to <i>service</i>/log/supervise/control. </dd>
</dl>
<p>
<b>runsvctrl</b> actually looks only at the first
character of <i>command</i>.
<h2><a name='sect4'>Exit Codes</a></h2>
<b>runsvctrl</b> exits 0, if the <i>command</i> was sent
successfully to all <i>services</i>. <p>
For each <i>service</i> that caused an error (e.g.
the directory is not controlled by a <i><b>runsv</b>(8)</i> process), <b>runsvctrl</b> increases
the exit code by one and exits non zero. The maximum is 100. <p>
<b>runsvctrl</b> exits
111 on error.
<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>runsvstat(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'>Commands</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>
|