summaryrefslogtreecommitdiff
path: root/src/journal/journal-gatewayd.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-18 01:41:01 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-18 01:41:01 -0500
commitc3a7cfb7dee251cab01e98a399e7d2a0f787b6b9 (patch)
treec2d6882e9a45370b2cfad3d38d1423a0eca569d3 /src/journal/journal-gatewayd.c
parenta93035cee3df135b72b8ff6c1d8361e2e647ed0b (diff)
journal-gatewayd,man: document new HTTPS options
Diffstat (limited to 'src/journal/journal-gatewayd.c')
-rw-r--r--src/journal/journal-gatewayd.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c
index 4a4905dbfb..dfec8352bb 100644
--- a/src/journal/journal-gatewayd.c
+++ b/src/journal/journal-gatewayd.c
@@ -862,6 +862,19 @@ static int request_handler(
return respond_error(connection, MHD_HTTP_NOT_FOUND, "Not found.\n");
}
+static int help(void) {
+
+ printf("%s [OPTIONS...] ...\n\n"
+ "HTTP server for journal events.\n\n"
+ " -h --help Show this help\n"
+ " --version Show package version\n"
+ " --cert=CERT.PEM Specify server certificate in PEM format\n"
+ " --key=KEY.PEM Specify server key in PEM format\n",
+ program_invocation_short_name);
+
+ return 0;
+}
+
static char *key_pem = NULL;
static char *cert_pem = NULL;
@@ -875,6 +888,7 @@ static int parse_argv(int argc, char *argv[]) {
int r, c;
static const struct option options[] = {
+ { "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, ARG_VERSION },
{ "key", required_argument, NULL, ARG_KEY },
{ "cert", required_argument, NULL, ARG_CERT },
@@ -884,13 +898,16 @@ static int parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0)
+ while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
switch(c) {
case ARG_VERSION:
puts(PACKAGE_STRING);
puts(SYSTEMD_FEATURES);
return 0;
+ case 'h':
+ return help();
+
case ARG_KEY:
if (key_pem) {
log_error("Key file specified twice");