summary refs log tree commit diff
path: root/doc/runsvdir.8.html
blob: 606a44b260e5bc32413c22f8b0efb7f0d854ef7a (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



<html>
<head>
<title>runsvdir(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>
runsvdir - starts and monitors a collection of <i>runsv(8)</i> processes 
<h2><a name='sect1'>Synopsis</a></h2>
<b>runsvdir</b>
<i>dir</i> [ <i>log</i> ] 
<h2><a name='sect2'>Description</a></h2>
<i>dir</i> must be a directory. <i>log</i> is a space holder for
a readproctitle log, and must be at least seven characters long or absent.
<p>
<b>runsvdir</b> starts a <i><b>runsv</b>(8)</i> process for each subdirectory in <i>dir</i>, up to
a limit of 1000 subdirectories. <b>runsvdir</b> skips subdirectory names starting
with dots. <i><b>runsv</b>(8)</i> must be in <b>runsvdir</b>&rsquo;s PATH. <p>
At least every five seconds,
<b>runsvdir</b> checks if <i>dir</i> has changed. If it sees a new subdirectory in <i>dir</i>,
it starts a new <i><b>runsv</b>(8)</i> process. If it sees an old sudirectory where a
<i><b>runsv</b>(8)</i> process has exited, it restarts the <i><b>runsv</b>(8)</i> process. If <b>runsvdir</b>
sees a subdirectory being removed that was previously there, it sends the
corresponding <i><b>runsv</b>(8)</i> process a TERM signal, stops monitoring this process,
and so does not restart the <i><b>runsv</b>(8)</i> process if it exits. <p>
If the <i>log</i> argument
is given to <b>runsvdir</b>, all output to standard error is redirected to this
<i>log</i>, which is similar to the <i><b>readproctitle</b>(8)</i> log. To see the most recent
error messages, use a process-listing tool such as <i><b>ps</b>(1)</i>. <b>runsvdir</b> writes
a dot to the readproctitle log every 15 minutes so that old error messages
expire. <p>
Normally <b>runsvdir</b> is started by <i><b>runit</b>(8)</i> in stage 2. 
<h2><a name='sect3'>Signals</a></h2>
If <b>runsvdir</b>
receives a TERM signal, it exits with 0 immediately. <p>
If <b>runsvdir</b> receives
a HUP signal, it sends a TERM signal to each <i><b>runsv</b>(8)</i> process it is monitoring
and then exits with 111. 
<h2><a name='sect4'>See Also</a></h2>
<i>runsv(8)</i>, <i>runit(8)</i>, <i>runit-init(8)</i>, <i>runsvchdir(8)</i>,
<i>runsvctrl(8)</i>, <i>runsvstat(8)</i>, <i>chpst(8)</i>, <i>svlogd(8)</i>, <i>utmpset(8)</i>, <i>svwaitdown(8)</i>,
<i>svwaitup(8)</i> <p>
<i>http://smarden.org/runit/</i> 
<h2><a name='sect5'>Author</a></h2>
Gerrit Pape &lt;pape@smarden.org&gt;
<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'>Signals</a></li>
<li><a name='toc4' href='#sect4'>See Also</a></li>
<li><a name='toc5' href='#sect5'>Author</a></li>
</ul>
</body>
</html>