runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

runsvdir.8.html (3124B)


      1 
      2 
      3 
      4 <html>
      5 <head>
      6 <title>runsvdir(8) manual page</title>
      7 </head>
      8 <body bgcolor='white'>
      9 <a href='http://smarden.org/pape/'>G. Pape</a><br><a href='index.html'>runit</A><hr><p>
     10 
     11 <h2><a name='sect0'>Name</a></h2>
     12 runsvdir - starts and monitors a collection of <i>runsv(8)</i> processes 
     13 <h2><a name='sect1'>Synopsis</a></h2>
     14 <b>runsvdir</b>
     15 [-P] <i>dir</i> [ <i>log</i> ] 
     16 <h2><a name='sect2'>Description</a></h2>
     17 <i>dir</i> must be a directory. <i>log</i> is a space holder
     18 for a readproctitle log, and must be at least seven characters long or
     19 absent. <p>
     20 <b>runsvdir</b> starts a <i><b>runsv</b>(8)</i> process for each subdirectory, or symlink
     21 to a directory, in the services directory <i>dir</i>, up to a limit of 1000 subdirectories,
     22 and restarts a <i><b>runsv</b>(8)</i> process if it terminates. <b>runsvdir</b> skips subdirectory
     23 names starting with dots. <i><b>runsv</b>(8)</i> must be in <b>runsvdir</b>&rsquo;s PATH. <p>
     24 At least every
     25 five seconds <b>runsvdir</b> checks whether the time of last modification, the
     26 inode, or the device, of the services directory <i>dir</i> has changed. If so,
     27 it re-scans the service directory, and if it sees a new subdirectory, or
     28 new symlink to a directory, in <i>dir</i>, it starts a new <i><b>runsv</b>(8)</i> process; if
     29 <b>runsvdir</b> sees a subdirectory being removed that was previously there, it
     30 sends the corresponding <i><b>runsv</b>(8)</i> process a TERM signal, stops monitoring
     31 this process, and so does not restart the <i><b>runsv</b>(8)</i> process if it exits.
     32 <p>
     33 If the <i>log</i> argument is given to <b>runsvdir</b>, all output to standard error
     34 is redirected to this <i>log</i>, which is similar to the daemontools&rsquo; <b>readproctitle</b>
     35 log. To see the most recent error messages, use a process-listing tool such
     36 as <i><b>ps</b>(1)</i>. <b>runsvdir</b> writes a dot to the readproctitle log every 15 minutes
     37 so that old error messages expire. 
     38 <h2><a name='sect3'>Options</a></h2>
     39 
     40 <dl>
     41 
     42 <dt><b>-P</b> </dt>
     43 <dd>use <i><b>setsid</b>(2)</i> to run each <i><b>runsv</b>(8)</i>
     44 process in a new session and separate process group. </dd>
     45 </dl>
     46 
     47 <h2><a name='sect4'>Signals</a></h2>
     48 If <b>runsvdir</b>
     49 receives a TERM signal, it exits with 0 immediately. <p>
     50 If <b>runsvdir</b> receives
     51 a HUP signal, it sends a TERM signal to each <i><b>runsv</b>(8)</i> process it is monitoring
     52 and then exits with 111. 
     53 <h2><a name='sect5'>See Also</a></h2>
     54 <i>sv(8)</i>, <i>runsv(8)</i>, <i>runsvchdir(8)</i>, <i>runit(8)</i>,
     55 <i>runit-init(8)</i>, <i>chpst(8)</i>, <i>svlogd(8)</i>, <i>utmpset(8)</i>, <i>setsid(2)</i> <p>
     56 <i>http://smarden.org/runit/</i>
     57 
     58 <h2><a name='sect6'>Author</a></h2>
     59 Gerrit Pape &lt;pape@smarden.org&gt; <p>
     60 
     61 <hr><p>
     62 <a name='toc'><b>Table of Contents</b></a><p>
     63 <ul>
     64 <li><a name='toc0' href='#sect0'>Name</a></li>
     65 <li><a name='toc1' href='#sect1'>Synopsis</a></li>
     66 <li><a name='toc2' href='#sect2'>Description</a></li>
     67 <li><a name='toc3' href='#sect3'>Options</a></li>
     68 <li><a name='toc4' href='#sect4'>Signals</a></li>
     69 <li><a name='toc5' href='#sect5'>See Also</a></li>
     70 <li><a name='toc6' href='#sect6'>Author</a></li>
     71 </ul>
     72 </body>
     73 </html>