diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-05-17 21:49:55 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-05-17 21:49:55 +0300 |
commit | ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07 (patch) | |
tree | aec21dde26528bf29fdcb232df0b997601e15c4e /src | |
parent | 41e4cf7b5ad33dcfc7f472b9392831fa197fd8e2 (diff) | |
download | genrc-ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07.tar.gz genrc-ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07.tar.bz2 |
Improve help output
Diffstat (limited to 'src')
-rw-r--r-- | src/genrc.c | 44 |
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 @@ -158,43 +158,61 @@ char const *help_msg[] = { " start start the program", " stop stop the program", " restart restart the running program", " 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:", "", " GENRC_COMMAND=COMMAND --command=COMMAND", " GENRC_PROGRAM=NAME --program=NAME", " 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:", "", " FILE:<NAME>", " Read PID from the file <NAME>", "", @@ -240,25 +258,29 @@ help(void) char const *usage_msg[] = { "genrc", "[-h]", "[-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]", "[--pidfile=PIDFILE]", "[--program=PROGRAM]", "[--sentinel]", "[--signal-reload=SIG]", "[--signal-stop=SIG]", "[--timeout=SECONDS]", "[--usage]", + "[--user=USER]", "{", "start", "|", "stop", "|", "restart", |