summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2018-05-17 18:49:55 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-05-17 18:49:55 (GMT)
commited8389beadb7cf1f8d95fe7addbc9ff2783f4d07 (patch) (side-by-side diff)
treeaec21dde26528bf29fdcb232df0b997601e15c4e
parent41e4cf7b5ad33dcfc7f472b9392831fa197fd8e2 (diff)
downloadgenrc-ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07.tar.gz
genrc-ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07.tar.bz2
Improve help output
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/genrc.c44
1 files changed, 33 insertions, 11 deletions
diff --git a/src/genrc.c b/src/genrc.c
index d4904b6..ae3070d 100644
--- a/src/genrc.c
+++ b/src/genrc.c
@@ -161,23 +161,43 @@ char const *help_msg[] = {
" reload send a reload signal to the program",
" status display the program status",
"",
- "OPTIONs are:\n",
- " -h, --help display this help list",
- " --usage display short usage information",
+ "OPTIONs are:",
+ "",
+ "Command to run:",
+ "",
" -c, --command=COMMAND command line to run",
" -p, --program=PROGRAM name of the program to run",
+ "",
+ " At least one of COMMAND or PROGRAM must be given.",
+ " If PROGRAM is supplied, but COMMAND is not, COMMAND is set to PROGRAM",
+ " Otherwise, if COMMAND is set, but PROGRAM is not, PROGRAM is set to the",
+ " first word (in the shell sense) in COMMAND.",
+ "",
+ "Runtime privileges:",
+ "",
+ " -u, --user=NAME run with this user privileges",
+ " -g, --group=GROUP[,GROUP...]]",
+ " run with this group(s) privileges",
+ "",
+ "Additional configuration:",
+ "",
+ " -t, --timeout=SECONDS time to wait for the program to start up or",
+ " terminate",
+ " --sentinel PROGRAM runs in foreground; disconnect from the",
+ " controlling terminal, run it and act as a sentinel",
" -P, --pid-from=SOURCE where to look for PIDs of the running programs",
" -F, --pidfile=NAME name of the PID file",
" (same as --pid-from=FILE:NAME)",
- " -t, --timeout=SECONDS time to wait for the program to start up or",
- " terminate",
" --signal-reload=SIG signal to send on reload (default: SIGHUP)",
" setting to 0 is equivalent to --no-reload",
" --no-reload makes reload equivalent to restart",
" --signal-stop=SIG signal to send in order to terminate the program",
" (default: SIGTERM)",
- " --sentinel PROGRAM runs in foreground; disconnect from the",
- " controlling terminal, run it and act as a sentinel",
+ "",
+ "Informational options:",
+ "",
+ " -h, --help display this help list",
+ " --usage display short usage information",
" --version display program version and exist",
"",
"Influential environment variables and corresponding options:",
@@ -187,11 +207,9 @@ char const *help_msg[] = {
" GENRC_PID_FROM=SOURCE --pid-from=SOURCE",
" GENRC_TIMEOUT=SECONDS --timeout=SECONDS",
" GENRC_SENTINEL=1 --sentinel",
+ " GENRC_USER=NAME --user=NAME",
+ " GENRC_GROUP=GROUPS --group=GROUPS",
"",
- " At least one of COMMAND or PROGRAM must be given.",
- " If PROGRAM is supplied, but COMMAND is not, COMMAND is set to PROGRAM",
- " Otherwise, if COMMAND is set, but PROGRAM is not, PROGRAM is set to the",
- " first word (in the shell sense) in COMMAND.",
"",
"PID sources:",
"",
@@ -243,9 +261,12 @@ char const *usage_msg[] = {
"[-F PIDFILE]",
"[-P SOURCE]",
"[-c COMMAND]",
+ "[-g GROUP[,GROUP...]]",
"[-p PROGRAM]",
"[-t SECONDS]",
+ "[-u USER]",
"[--command=COMMAND]",
+ "[--group GROUP[,GROUP...]]",
"[--help]",
"[--no-reload]",
"[--pid-from=SOURCE]",
@@ -256,6 +277,7 @@ char const *usage_msg[] = {
"[--signal-stop=SIG]",
"[--timeout=SECONDS]",
"[--usage]",
+ "[--user=USER]",
"{",
"start",
"|",

Return to:

Send suggestions and report system problems to the System administrator.