aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-09-13 09:34:47 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2019-09-13 09:34:47 +0300
commit680f6e14bfdebb226fa8420903384f70f5b98459 (patch)
tree76144b69aa63f0dda95648800dfc8fdcb5514b4f /src
parent4f60d13820ad95d876f6daacefe4e72ffff57a5f (diff)
downloadgenrc-680f6e14bfdebb226fa8420903384f70f5b98459.tar.gz
genrc-680f6e14bfdebb226fa8420903384f70f5b98459.tar.bz2
Minor fixes in the manpage
Diffstat (limited to 'src')
-rw-r--r--src/genrc.836
1 files changed, 18 insertions, 18 deletions
diff --git a/src/genrc.8 b/src/genrc.8
index ed077bf..0fdfa54 100644
--- a/src/genrc.8
+++ b/src/genrc.8
@@ -13,7 +13,7 @@
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with genrc. If not, see <http://www.gnu.org/licenses/>. 15.\" along with genrc. If not, see <http://www.gnu.org/licenses/>.
16.TH GENRC 8 "July 11, 2019" "GENRC" "Genrc User Manual" 16.TH GENRC 8 "September 13, 2019" "GENRC" "Genrc User Manual"
17.SH NAME 17.SH NAME
18genrc \- generic system initialization script helper 18genrc \- generic system initialization script helper
19.SH SYNOPSIS 19.SH SYNOPSIS
@@ -86,15 +86,15 @@ will be used as the command to run.
86.PP 86.PP
87The program operation modes are: 87The program operation modes are:
88.SS start 88.SS start
89If given \fBstart\fR argument, \fBgenrc\fR runs the supplier 89If given this argument, \fBgenrc\fR runs the supplied
90command. Before, it checks if the program is not already running and 90command. Before, it checks if the program is not already running and
91refuses to start its second copy if so. 91refuses to start its second copy if so.
92.PP 92.PP
93It is supposed that the program to be run will detach from the 93It is supposed that the program to be run will detach from the
94controlling terminal and continue running in the background (i.e. it 94controlling terminal and will continue running in the background (i.e. it
95is a \fIdaemon\fR, in UNIX sense). If it is not the case, use the 95is a \fIdaemon\fR, in UNIX sense). If it is not the case, use the
96\fB\-\-sentinel\fR option. With this option, \fBgenrc\fR will start 96\fB\-\-sentinel\fR option. With this option, \fBgenrc\fR will start
97the command and will become daemon itself, controlling the execution 97the command and become a daemon itself, controlling the execution
98of the program. It will exit when the command terminates. So long as 98of the program. It will exit when the command terminates. So long as
99the command runs, \fBgenrc\fR will pipe its standard output and error 99the command runs, \fBgenrc\fR will pipe its standard output and error
100to syslog facility \fBdaemon\fR. The standard output will be logged 100to syslog facility \fBdaemon\fR. The standard output will be logged
@@ -113,8 +113,8 @@ controlled by the \fB\-\-restart\-on\-exit\fR and
113\fB\-\-restart\-on\-signal\fR options. Use this feature to ensure the 113\fB\-\-restart\-on\-signal\fR options. Use this feature to ensure the
114service provided by the program won't get terminated because of 114service provided by the program won't get terminated because of
115hitting a bug or encountering an unforeseen external condition. For 115hitting a bug or encountering an unforeseen external condition. For
116example, the following two options will ensure that the program will 116example, the following two options make sure that the program will
117be terminated only if it exits with status 0 or it is terminated by 117be terminated only if it exits with status 0 or is delivered the
118SIGTERM or SIGQUIT signal: 118SIGTERM or SIGQUIT signal:
119.EX 119.EX
120--restart-on-exit='!0' --restart-on-signal='!TERM,QUIT' 120--restart-on-exit='!0' --restart-on-signal='!TERM,QUIT'
@@ -134,27 +134,27 @@ the program restarted again.
134In \fBstatus\fR mode \fBgenrc\fR verifies if the \fICOMMAND\fR is 134In \fBstatus\fR mode \fBgenrc\fR verifies if the \fICOMMAND\fR is
135already running and outputs its status on the standard output. To this 135already running and outputs its status on the standard output. To this
136effect, it uses an abstraction called \fIPID source\fR, which allows 136effect, it uses an abstraction called \fIPID source\fR, which allows
137it to determine the PID of the program by its name of command line. 137it to determine the PID of the program.
138.PP 138.PP
139The default PID source is the Linux \fB/proc\fR filesystem (or, if it 139The default PID source is the Linux \fB/proc\fR filesystem (or, if it
140is not available, the output of \fBps -ef\fR), which is scanned for 140is not available, the output of \fBps -ef\fR), which is scanned for
141the name of the program (given by \fB\-\-program\fR or 141the name of the program (as given by \fB\-\-program\fR or
142\fB\-\-command\fR options). 142\fB\-\-command\fR options).
143.PP 143.PP
144The source to use can be supplied with the \fB\-\-pid\-from\fR option 144The source to use can be supplied with the \fB\-\-pid\-from\fR option
145(or the \fB\-\-pidfile option, which is equivalent to 145(or the \fB\-\-pidfile\R option, which is equivalent to
146\fB\-\-pid\-from=FILE:\fR). See the section \fBPID SOURCES\fR for a 146\fB\-\-pid\-from=FILE:\fR). See the section \fBPID SOURCES\fR for a
147detailed discussion of available sources. 147detailed discussion of available sources.
148.SS stop 148.SS stop
149In the \fBstop\fR mode \fBgenrc\fR stops the command by sending it 149In the \fBstop\fR mode \fBgenrc\fR stops the command by sending it
150\fBSIGTERM\fR (or another signal as supplied with the 150\fBSIGTERM\fR (or another signal, as supplied with the
151\fB\-\-signal\-stop\fR option). If the PID source returns multiple 151\fB\-\-signal\-stop\fR option). If the PID source returns multiple
152PIDs, by default only parent PID is selected. However, \fBgenrc\fR can 152PIDs, by default only parent PID is selected. However, \fBgenrc\fR can
153be instructed to signal all PIDs instead (see the \fBa\fR flag in the 153be instructed to signal all PIDs instead (see the \fBa\fR flag in the
154description of \fBPROC\fR or \fBPS\fR PID source). 154description of \fBPROC\fR or \fBPS\fR PID source).
155.PP 155.PP
156After sending the signal, the program will wait for all processes to 156After sending the signal, the program will wait for all processes to
157terminate. It will report error if they don't terminate within 5 157terminate. It will report an error if they don't terminate within 5
158seconds. This timeout can be changed using the \fB\-\-timeout\fR 158seconds. This timeout can be changed using the \fB\-\-timeout\fR
159option. 159option.
160.SS restart 160.SS restart
@@ -163,7 +163,7 @@ Restarts the program. It is equivalent to running
163immediately followed by 163immediately followed by
164.BR "genrc start" . 164.BR "genrc start" .
165.SS reload 165.SS reload
166Attempt to reload (or reconfigure) the program by sending it the 166Attempts to reload (or reconfigure) the program by sending it the
167\fBSIGHUP\fR signal (or another signal, as given with the 167\fBSIGHUP\fR signal (or another signal, as given with the
168\fB\-\-signal\-reload\fR option). The \fB\-\-no\-reload\fR or 168\fB\-\-signal\-reload\fR option). The \fB\-\-no\-reload\fR or
169\fB\-\-signal\-reload=0\fR option disables this behavior, making 169\fB\-\-signal\-reload=0\fR option disables this behavior, making
@@ -208,7 +208,7 @@ Run program with this \fIGROUP\fR privileges. If the argument is a
208list of groups, the first group becomes the principal, and the 208list of groups, the first group becomes the principal, and the
209rest of them supplementary groups. Each \fIGROUP\fR is either a group 209rest of them supplementary groups. Each \fIGROUP\fR is either a group
210name or a numeric group number prefixed with a plus sign. Whatever 210name or a numeric group number prefixed with a plus sign. Whatever
211notation is used, it must exist in the system group database. 211notation is used, the groups must exist in the system group database.
212 212
213See also the \fB\-\-user\fR option. 213See also the \fB\-\-user\fR option.
214.TP 214.TP
@@ -322,14 +322,14 @@ Configuration specified as fully-qualified keyword-value pairs
322.RE 322.RE
323.TP 323.TP
324\fBGREP:\fIFILE\fB:s/\fIRX\fB/\fIREPL\fB/[\fIFLAGS\fR][\fB;\fR...] 324\fBGREP:\fIFILE\fB:s/\fIRX\fB/\fIREPL\fB/[\fIFLAGS\fR][\fB;\fR...]
325Grep for the first line in \fIFILE\fR that matches \fIRX\fR. If found, process 325Grep for the first line in \fIFILE\fR that matches \fIRX\fR. If found,
326replace the matched portion according to \fIREPL\fR and \fIFLAGS\fR. Use 326modify the matched portion according to \fIREPL\fR and \fIFLAGS\fR. Use
327the resulting string as PID. More sed expressions can be supplied, 327the resulting string as PID. More sed expressions can be supplied,
328separated with semicolons. 328separated with semicolons.
329.TP 329.TP
330\fBPROC\fR[\fB:\fR[\fIEXE\fR][\fB:\fIFLAGS\fR]] 330\fBPROC\fR[\fB:\fR[\fIEXE\fR][\fB:\fIFLAGS\fR]]
331Look for matching program in \fB/proc/\fIPID\fB/*\fR. If \fIEXE\fR is 331Look for matching program in \fB/proc/\fIPID\fB/*\fR. If \fIEXE\fR is
332not supplied or empty, program name from \fB\-\-program\fR will be 332not supplied or empty, the program name from \fB\-\-program\fR will be
333used. \fIFLAGS\fR are: 333used. \fIFLAGS\fR are:
334.RS 334.RS
335.TP 335.TP
@@ -358,7 +358,7 @@ match real executable name (instead of argv0)
358signal all matching PIDs 358signal all matching PIDs
359.RE 359.RE
360.TP 360.TP
361\fBPS:\fR[\fB:\fR[\fIEXE\fR][:\fIFLAGS\fR]] 361\fBPS\fR[\fB:\fR[\fIEXE\fR][:\fIFLAGS\fR]]
362Look for matching program in the output of \fBps \-ef\fR. \fIEXE\fR 362Look for matching program in the output of \fBps \-ef\fR. \fIEXE\fR
363and \fIFLAGS\fR are as described above. 363and \fIFLAGS\fR are as described above.
364.SH ENVIRONMENT 364.SH ENVIRONMENT
@@ -382,7 +382,7 @@ Sergey Poznyakoff
382.SH "BUG REPORTS" 382.SH "BUG REPORTS"
383Report bugs to <gray@gnu.org>. 383Report bugs to <gray@gnu.org>.
384.SH COPYRIGHT 384.SH COPYRIGHT
385Copyright \(co 2018 Sergey Poznyakoff 385Copyright \(co 2018, 2019 Sergey Poznyakoff
386.br 386.br
387.na 387.na
388License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 388License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

Return to:

Send suggestions and report system problems to the System administrator.