aboutsummaryrefslogtreecommitdiff
path: root/src/arm/gnunet-arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arm/gnunet-arm.c')
-rw-r--r--src/arm/gnunet-arm.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c
index c631ec480..4e6d6f965 100644
--- a/src/arm/gnunet-arm.c
+++ b/src/arm/gnunet-arm.c
@@ -357,31 +357,6 @@ cps_loop (void *cls,
357 357
358 358
359/** 359/**
360 * gnunet-arm command line options
361 */
362static struct GNUNET_GETOPT_CommandLineOption options[] = {
363 {'e', "end", NULL, gettext_noop ("stop all GNUnet services"),
364 GNUNET_NO, &GNUNET_GETOPT_set_one, &end},
365 {'i', "init", "SERVICE", gettext_noop ("start a particular service"),
366 GNUNET_YES, &GNUNET_GETOPT_set_string, &init},
367 {'k', "kill", "SERVICE", gettext_noop ("stop a particular service"),
368 GNUNET_YES, &GNUNET_GETOPT_set_string, &term},
369 {'s', "start", NULL, gettext_noop ("start all GNUnet default services"),
370 GNUNET_NO, &GNUNET_GETOPT_set_one, &start},
371 {'r', "restart", NULL, gettext_noop ("stop and start all GNUnet default services"),
372 GNUNET_NO, &GNUNET_GETOPT_set_one, &restart},
373 {'t', "test", "SERVICE",
374 gettext_noop ("test if a particular service is running"),
375 GNUNET_YES, &GNUNET_GETOPT_set_string, &test},
376 {'d', "delete", NULL, gettext_noop ("delete config file and directory on exit"),
377 GNUNET_NO, &GNUNET_GETOPT_set_one, &delete},
378 {'q', "quiet", NULL, gettext_noop ("don't print status messages"),
379 GNUNET_NO, &GNUNET_GETOPT_set_one, &quiet},
380 GNUNET_GETOPT_OPTION_END
381};
382
383
384/**
385 * The main function to obtain arm from gnunetd. 360 * The main function to obtain arm from gnunetd.
386 * 361 *
387 * @param argc number of arguments from the command line 362 * @param argc number of arguments from the command line
@@ -391,6 +366,26 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
391int 366int
392main (int argc, char *const *argv) 367main (int argc, char *const *argv)
393{ 368{
369 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
370 {'e', "end", NULL, gettext_noop ("stop all GNUnet services"),
371 GNUNET_NO, &GNUNET_GETOPT_set_one, &end},
372 {'i', "init", "SERVICE", gettext_noop ("start a particular service"),
373 GNUNET_YES, &GNUNET_GETOPT_set_string, &init},
374 {'k', "kill", "SERVICE", gettext_noop ("stop a particular service"),
375 GNUNET_YES, &GNUNET_GETOPT_set_string, &term},
376 {'s', "start", NULL, gettext_noop ("start all GNUnet default services"),
377 GNUNET_NO, &GNUNET_GETOPT_set_one, &start},
378 {'r', "restart", NULL, gettext_noop ("stop and start all GNUnet default services"),
379 GNUNET_NO, &GNUNET_GETOPT_set_one, &restart},
380 {'t', "test", "SERVICE",
381 gettext_noop ("test if a particular service is running"),
382 GNUNET_YES, &GNUNET_GETOPT_set_string, &test},
383 {'d', "delete", NULL, gettext_noop ("delete config file and directory on exit"),
384 GNUNET_NO, &GNUNET_GETOPT_set_one, &delete},
385 {'q', "quiet", NULL, gettext_noop ("don't print status messages"),
386 GNUNET_NO, &GNUNET_GETOPT_set_one, &quiet},
387 GNUNET_GETOPT_OPTION_END
388 };
394 return (GNUNET_OK == 389 return (GNUNET_OK ==
395 GNUNET_PROGRAM_run (argc, 390 GNUNET_PROGRAM_run (argc,
396 argv, 391 argv,