commit 345e3f4cea0993e8c1bbaa21436069a59cf2a226
parent 3ea3a308d9561d93e09cdc8cf6e567e69e3f5410
Author: Gerrit Pape <pape@smarden.org>
Date: Fri, 18 Oct 2002 11:27:08 +0000
man pages written.
Diffstat:
5 files changed, 178 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
@@ -1,8 +1,9 @@
runit (0.7.0-3) unstable; urgency=low
* initial official debian package (closes: #164301).
+ * debian/runsvstat.8, debian/runsvctrl.8: new.
- -- Gerrit Pape <pape@smarden.org> Fri, 18 Oct 2002 11:12:20 +0200
+ -- Gerrit Pape <pape@smarden.org> Fri, 18 Oct 2002 13:25:33 +0200
runit (0.7.0-2) unstable; urgency=low
diff --git a/debian/runsvctrl.8 b/debian/runsvctrl.8
@@ -0,0 +1,108 @@
+.TH runsvctrl 8
+.SH NAME
+runsvctrl \- controls a service monitored by
+.BR runsv (8).
+.SH hSYNOPSIS
+.B runsvctrl
+.I command
+.I services
+.SH DESCRIPTION
+.I services
+consists of one or more arguments, each argument naming a directory used by
+.BR runsv (8).
+.I command
+is one of up, down, once, pause, cont, hup, alarm, interrupt, 1, 2, term,
+kill, or exit.
+.P
+For each
+.I service
+of
+.IR services ,
+.B runsvctrl
+sends the command
+.I command
+to the
+.IR service ,
+which must be controlled by
+.BR runsv (8).
+.SH COMMANDS
+.TP
+.B up
+If the service is not running, start it. If the service stops, restart it.
+.TP
+.B down
+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.
+.TP
+.B once
+If the service is not running, start it. Do not restart it if it stops.
+.TP
+.B pause
+If the service is running, send it a STOP signal.
+.TP
+.B cont
+If the service is running, send it a CONT signal.
+.TP
+.B hup
+If the service is running, send it a HUP signal.
+.TP
+.B alarm
+If the service is running, send it a ALRM signal.
+.TP
+.B interrupt
+If the service is running, send it a INT signal.
+.TP
+.B 1
+User-defined 1. If the service is running, send it a USR1 signal.
+.TP
+.B 2
+User-defined 2. If the service is running, send it a USR2 signal.
+.TP
+.B term
+If the service is running, send it a TERM signal.
+.TP
+.B kill
+If the service is running, send it a KILL signal.
+.TP
+.B exit
+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,
+.BR runsv (8)
+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,
+.BR runsv (8)
+exits. This command is ignored if it is given to
+.IR service /log/supervise/control.
+.P
+.BR runsvctrl
+actually looks only at the first character of
+.IR command .
+.SH EXIT CODES
+.B runsvctrl
+exits 0, if the
+.I command
+was sent successfully to all
+.IR services .
+.P
+For each
+.I service
+that caused an error (e.g. the directory is not controlled by a
+.BR runsv (8)
+process),
+.B runsvctrl
+increases the exit code by one and exits non zero. The maximum is 100.
+.P
+.B runsvctrl
+exits 111 on error.
+.SH SEE ALSO
+runsvstat(8),
+runit(8),
+runit-init(8),
+runsvdir(8),
+runsv(8),
+svwaitdown(8),
+svwaitup(8)
+.P
+ http://smarden.org/runit/
+.SH AUTHOR
+Gerrit Pape <pape@smarden.org>
diff --git a/debian/runsvstat.8 b/debian/runsvstat.8
@@ -0,0 +1,66 @@
+.TH runsvstat 8
+.SH NAME
+runsvstat \- prints the status of services monitored by
+.BR runsv (8).
+.SH SYNOPSIS
+.B runsvstat
+[
+.B \-l
+]
+.I services
+.SH DESCRIPTION
+.I services
+consists of one or more arguments, each argument naming a directory.
+.P
+.B runsvstat
+checks for each directory if
+.BR runsv (8)
+is successfully running this
+.IR service ,
+and if so, prints one human-readable line reporting the status of this
+.IR service .
+Optionally
+.BR runsvstat (8)
+prints a second line, also in human-readable format, reporting the status
+of the corresponding
+.I log
+.IR service .
+.SH OPTIONS
+.TP
+.B -l
+log service. Check for each
+.I service
+if there exists a corresponding
+.I log
+.IR service .
+If so, print an additional, indented, line reporting the status of the
+.I log
+.IR service .
+.SH EXIT CODES
+.B runsvstat
+exits 0, if the states of all
+.I services
+were reported successfully.
+.P
+For each
+.I service
+that caused an error (e.g. the directory is not controlled by a
+.BR runsv (8)
+process),
+.B runsvstat
+increases the exit code by one and exits non zero. The maximum is 100.
+.P
+.B runsvstat
+exits 111 on error.
+.SH SEE ALSO
+runsvctrl(8),
+runit(8),
+runit-init(8),
+runsvdir(8),
+runsv(8),
+svwaitdown(8),
+svwaitup(8)
+.P
+ http://smarden.org/runit/
+.SH AUTHOR
+Gerrit Pape <pape@smarden.org>
diff --git a/src/runsvctrl.c b/src/runsvctrl.c
@@ -17,7 +17,7 @@ void usage() {
strerr_die4x(1, "usage: ", progname, USAGE, "\n");
}
void fatal(char *m1) {
- strerr_die3sys(rc, FATAL, m1, ": ");
+ strerr_die3sys(111, FATAL, m1, ": ");
}
void warn(char *m1, char *m2) {
rc++;
diff --git a/src/runsvstat.c b/src/runsvstat.c
@@ -25,7 +25,7 @@ void usage() {
strerr_die4x(1, "usage: ", progname, USAGE, "\n");
}
void fatal(char *m1) {
- strerr_die3sys(rc, FATAL, m1, ": ");
+ strerr_die3sys(111, FATAL, m1, ": ");
}
void warn(char *m1, char *m2) {
rc++;