runit

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

commit a582f98e3b38f7fcc90b8e8518e002e390e96651
parent cb93a7054eb865c76aba41666bf4021bb65123ed
Author: Gerrit Pape <pape@smarden.org>
Date:   Sun, 24 Jul 2005 16:24:28 +0000

add sv.8.html.
re-fix runsv.8.html, runsvctrl.8.html.

Diffstat:
Mdoc/index.html | 2++
Mdoc/runsv.8.html | 9+++++++--
Mdoc/runsvctrl.8.html | 10+++++++---
Adoc/sv.8.html | 182+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 198 insertions(+), 5 deletions(-)

diff --git a/doc/index.html b/doc/index.html @@ -33,6 +33,8 @@ release 1.0.x of <i>runit</i>. <a href="runsvstat.8.html">The <tt>runsvstat</tt> program</a><br> <a href="runsvctrl.8.html">The <tt>runsvctrl</tt> program</a><br> <br> +<a href="sv.8.html">The <tt>sv</tt> program</a><br> +<br> <a href="svlogd.8.html">The <tt>svlogd</tt> program</a><br> <br> <a href="svwaitdown.8.html">The <tt>svwaitdown</tt> program</a><br> diff --git a/doc/runsv.8.html b/doc/runsv.8.html @@ -76,8 +76,13 @@ running, send it a INT signal. </dd> <dt><b>q</b> </dt> <dd>Quit. If the service is running, send it -a QUIT signal. </li><b></b><li>User-defined 1. If the service is running, send it a USR1 signal. -</li><b></b><li>User-defined 2. If the service is running, send it a USR2 signal. </dd> +a QUIT signal. </dd> + +<dt><b>1</b> </dt> +<dd>User-defined 1. If the service is running, send it a USR1 signal. </dd> + +<dt><b>2</b> </dt> +<dd>User-defined 2. If the service is running, send it a USR2 signal. </dd> <dt><b>t</b> </dt> <dd>Terminate. diff --git a/doc/runsvctrl.8.html b/doc/runsvctrl.8.html @@ -57,9 +57,13 @@ is running, send it a ALRM signal. </dd> send it a INT signal. </dd> <dt><b>quit</b> </dt> -<dd>If the service is running, send it a QUIT signal. -</li><b></b><li>If the service is running, send it a USR1 signal. </li><b></b><li>If the service is running, -send it a USR2 signal. </dd> +<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. diff --git a/doc/sv.8.html b/doc/sv.8.html @@ -0,0 +1,182 @@ + + + +<html> +<head> +<title>sv(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> +sv - control and manage services monitored by <i><b>runsv</b>(8)</i> +<h2><a name='sect1'>Synopsis</a></h2> +<b>sv</b> [-v] +[-w <i>sec]</i> <i>command</i> <i>services</i> <p> +<b>/etc/init.d/</b><i>service</i> [-w <i>sec]</i> <i>command</i> +<h2><a name='sect2'>Description</a></h2> +The +<b>sv</b> program reports the current status and controls the state of services +monitored by the <i><b>runsv</b>(8)</i> supervisor. <p> +<i>services</i> consists of one or more arguments, +each argument naming a directory <i>service</i> used by <i><b>runsv</b>(8)</i>. If <i>service</i> doesn&rsquo;t +start with a dot or slash, it is searched in the default services directory +<i>/var/service/</i>, otherwise relative to the current directory. <p> +<i>command</i> is one +of up, down, status, once, pause, cont, hup, alarm, interrupt, 1, 2, term, +kill, or exit, or start, stop, restart, shutdown, force-stop, force-reload, +force-restart, force-shutdown. <p> +The <b>sv</b> program can be sym-linked to <i>/etc/init.d/</i> +to provide an LSB init script interface. The <i>service</i> to be controlled then +is specified by the base name of the &lsquo;&lsquo;init script&rsquo;&rsquo;. +<h2><a name='sect3'>Commands</a></h2> + +<dl> + +<dt><b>status</b> </dt> +<dd>Report +the current status of the service to standard output. </dd> + +<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 the TERM signal, and the CONT 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 +cont hup alarm interrupt quit 1 2 term kill</b> </dt> +<dd>If the service is running, +send it the STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, or KILL +signal respectively. </dd> + +<dt><b>exit</b> </dt> +<dd>If the service is running, send it the TERM signal, +and the CONT 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 the 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 an appendant log service. </dd> +</dl> +<p> +<b>sv</b> actually looks only at the first character +of these <i>command</i>s. +<h2><a name='sect4'>Commands compatible to LSB init script actions</a></h2> + +<dl> + +<dt><b>status</b> +</dt> +<dd>Same as <i>status</i>. </dd> + +<dt><b>start</b> </dt> +<dd>Same as <i>up</i>, but wait up to 7 seconds for the command +to take effect. Then report the status or timeout. </dd> + +<dt><b>stop</b> </dt> +<dd>Same as <i>down</i>, but +wait up to 7 seconds for the service to become down. Then report the status +or timeout. </dd> + +<dt><b>restart</b> </dt> +<dd>Send the commands <i>term</i>, <i>cont</i>, and <i>up</i> to the service, +and wait up to 7 seconds for the service to restart. Then report the status +or timeout. </dd> + +<dt><b>shutdown</b> </dt> +<dd>Same as <i>exit</i>, but wait up to 7 seconds for the <i><b>runsv</b>(8)</i> +process to terminate. Then report the status or timeout. </dd> + +<dt><b>force-stop</b> </dt> +<dd>Same as +<i>down</i>, but wait up to 7 seconds for the service to become down. Then report +the status, and on timeout send the service the <i>kill</i> command. </dd> + +<dt><b>force-reload</b> +</dt> +<dd>Send the service the <i>term</i> and <i>cont</i> commands, and wait up to 7 seconds for +the service to restart. Then report the status, and on timeout send the +service the <i>kill</i> command. </dd> + +<dt><b>force-restart</b> </dt> +<dd>Send the service the <i>term</i>, <i>cont</i> and +<i>up</i> commands, and wait up to 7 seconds for the service to restart. Then report +the status, and on timeout send the service the <i>kill</i> command. </dd> + +<dt><b>force-shutdown</b> +</dt> +<dd>Same as <i>exit</i>, but wait up to 7 seconds for the <i><b>runsv</b>(8)</i> process to terminate. +Then report the status, and on timeout send the service the <i>kill</i> command. +</dd> +</dl> + +<h2><a name='sect5'>Options</a></h2> + +<dl> + +<dt><b>-v</b> </dt> +<dd>If the <i>command</i> is up, down, term, once, or exit, then wait up +to 7 seconds for the command to take effect. Then report the status or timeout. +</dd> + +<dt><b>-w <i>sec</b> </i></dt> +<dd>Override the default timeout of 7 seconds with <i>sec</i> seconds. This option +implies <i>-v</i>. </dd> +</dl> + +<h2><a name='sect6'>Environment</a></h2> + +<dl> + +<dt><b>SVDIR</b> </dt> +<dd>The environment variable $SVDIR overrides the +default services directory <i>/var/service/</i>. </dd> + +<dt><b>SVWAIT</b> </dt> +<dd>The environment variable +$SVWAIT overrides the default 7 seconds to wait for a command to take effect. +It is overridden by the -w option. </dd> +</dl> + +<h2><a name='sect7'>Exit Codes</a></h2> +<b>sv</b> exits 0, if the <i>command</i> was +successfully sent to all <i>services</i>, and, if it was told to wait, the <i>command</i> +has taken effect to all services. <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, or <b>sv</b> timed +out while waiting), <b>sv</b> increases the exit code by one and exits non zero. +The maximum is 99. <b>sv</b> exits 100 on error. <p> +If <b>sv</b> is called with a base name +other than <b>sv</b>, it exits 1 on timeout or trouble sending the command. If +the <i>command</i> is <b>status</b>, it exits 3 if the service is down, and 4 if the +status is unknown. It exits 2 on wrong usage, and 151 on error. +<h2><a name='sect8'>See Also</a></h2> +<i>runsv(8)</i>, +<i>runsvdir(8)</i>, <i>runsvchdir(8)</i>, <i>chpst(8)</i>, <i>svlogd(8)</i>, <i>runit(8)</i>, <i>runit-init(8)</i> +<p> +<i>http://smarden.org/runit/</i> +<h2><a name='sect9'>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'>Commands</a></li> +<li><a name='toc4' href='#sect4'>Commands compatible to LSB init script actions</a></li> +<li><a name='toc5' href='#sect5'>Options</a></li> +<li><a name='toc6' href='#sect6'>Environment</a></li> +<li><a name='toc7' href='#sect7'>Exit Codes</a></li> +<li><a name='toc8' href='#sect8'>See Also</a></li> +<li><a name='toc9' href='#sect9'>Author</a></li> +</ul> +</body> +</html>