+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_flag ('e',
+ "end",
+ gettext_noop ("stop all GNUnet services"),
+ &end),
+ GNUNET_GETOPT_option_string ('i',
+ "init",
+ "SERVICE",
+ gettext_noop ("start a particular service"),
+ &init),
+ GNUNET_GETOPT_option_string ('k',
+ "kill",
+ "SERVICE",
+ gettext_noop ("stop a particular service"),
+ &term),
+ GNUNET_GETOPT_option_flag ('s',
+ "start",
+ gettext_noop ("start all GNUnet default services"),
+ &start),
+ GNUNET_GETOPT_option_flag ('r',
+ "restart",
+ gettext_noop ("stop and start all GNUnet default services"),
+ &restart),
+ GNUNET_GETOPT_option_flag ('d',
+ "delete",
+ gettext_noop ("delete config file and directory on exit"),
+ &delete),
+ GNUNET_GETOPT_option_flag ('m',
+ "monitor",
+ gettext_noop ("monitor ARM activities"),
+ &monitor),
+ GNUNET_GETOPT_option_flag ('q',
+ "quiet",
+ gettext_noop ("don't print status messages"),
+ &quiet),
+ GNUNET_GETOPT_option_relative_time ('T',
+ "timeout",
+ "DELAY",
+ gettext_noop ("exit with error status if operation does not finish after DELAY"),
+ &timeout),
+ GNUNET_GETOPT_option_flag ('I',
+ "info",
+ gettext_noop ("list currently running services"),
+ &list),
+ GNUNET_GETOPT_option_flag ('O',
+ "no-stdout",
+ gettext_noop ("don't let gnunet-service-arm inherit standard output"),
+ &no_stdout),
+ GNUNET_GETOPT_option_flag ('E',
+ "no-stderr",
+ gettext_noop ("don't let gnunet-service-arm inherit standard error"),
+ &no_stderr),
+ GNUNET_GETOPT_OPTION_END
+ };
+
+ if (GNUNET_OK !=
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 2;
+
+ if (GNUNET_OK ==
+ GNUNET_PROGRAM_run (argc,
+ argv,
+ "gnunet-arm",
+ gettext_noop
+ ("Control services and the Automated Restart Manager (ARM)"),
+ options,
+ &run, NULL))
+ {
+ GNUNET_free ((void *) argv);
+ return ret;
+ }
+ GNUNET_free ((void*) argv);
+ return 1;