aboutsummaryrefslogtreecommitdiff
path: root/src/arm/gnunet-arm.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-15 11:08:27 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-15 11:14:59 +0100
commitdc0d60c9c8a635221c0d656611f8f93e0256ed84 (patch)
treea68429c30be7ea19f1ae6063b32196f430d557e3 /src/arm/gnunet-arm.c
parent7fbbaf40abc0f17f6788f8e2c583c7ef5add5dbb (diff)
downloadgnunet-dc0d60c9c8a635221c0d656611f8f93e0256ed84.tar.gz
gnunet-dc0d60c9c8a635221c0d656611f8f93e0256ed84.zip
Porting 'arm'.
Diffstat (limited to 'src/arm/gnunet-arm.c')
-rw-r--r--src/arm/gnunet-arm.c97
1 files changed, 66 insertions, 31 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c
index 49886eb56..78c78738a 100644
--- a/src/arm/gnunet-arm.c
+++ b/src/arm/gnunet-arm.c
@@ -121,12 +121,12 @@ static struct GNUNET_SCHEDULER_Task *timeout_task;
121/** 121/**
122 * Do we want to give our stdout to gnunet-service-arm? 122 * Do we want to give our stdout to gnunet-service-arm?
123 */ 123 */
124static unsigned int no_stdout; 124static int no_stdout;
125 125
126/** 126/**
127 * Do we want to give our stderr to gnunet-service-arm? 127 * Do we want to give our stderr to gnunet-service-arm?
128 */ 128 */
129static unsigned int no_stderr; 129static int no_stderr;
130 130
131/** 131/**
132 * Handle for the task running the #action_loop(). 132 * Handle for the task running the #action_loop().
@@ -762,35 +762,70 @@ run (void *cls,
762int 762int
763main (int argc, char *const *argv) 763main (int argc, char *const *argv)
764{ 764{
765 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 765 struct GNUNET_GETOPT_CommandLineOption options[] = {
766 {'e', "end", NULL, gettext_noop ("stop all GNUnet services"), 766
767 GNUNET_NO, &GNUNET_GETOPT_set_one, &end}, 767 GNUNET_GETOPT_OPTION_SET_ONE ('e',
768 {'i', "init", "SERVICE", gettext_noop ("start a particular service"), 768 "end",
769 GNUNET_YES, &GNUNET_GETOPT_set_string, &init}, 769 gettext_noop ("stop all GNUnet services"),
770 {'k', "kill", "SERVICE", gettext_noop ("stop a particular service"), 770 &end),
771 GNUNET_YES, &GNUNET_GETOPT_set_string, &term}, 771
772 {'s', "start", NULL, gettext_noop ("start all GNUnet default services"), 772 GNUNET_GETOPT_OPTION_STRING ('i',
773 GNUNET_NO, &GNUNET_GETOPT_set_one, &start}, 773 "init",
774 {'r', "restart", NULL, 774 "SERVICE",
775 gettext_noop ("stop and start all GNUnet default services"), 775 gettext_noop ("start a particular service"),
776 GNUNET_NO, &GNUNET_GETOPT_set_one, &restart}, 776 &init),
777 {'d', "delete", NULL, 777
778 gettext_noop ("delete config file and directory on exit"), 778 GNUNET_GETOPT_OPTION_STRING ('k',
779 GNUNET_NO, &GNUNET_GETOPT_set_one, &delete}, 779 "kill",
780 {'m', "monitor", NULL, 780 "SERVICE",
781 gettext_noop ("monitor ARM activities"), 781 gettext_noop ("stop a particular service"),
782 GNUNET_NO, &GNUNET_GETOPT_set_one, &monitor}, 782 &term),
783 {'q', "quiet", NULL, gettext_noop ("don't print status messages"), 783
784 GNUNET_NO, &GNUNET_GETOPT_set_one, &quiet}, 784 GNUNET_GETOPT_OPTION_SET_ONE ('s',
785 {'T', "timeout", "DELAY", 785 "start",
786 gettext_noop ("exit with error status if operation does not finish after DELAY"), 786 gettext_noop ("start all GNUnet default services"),
787 GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &timeout}, 787 &start),
788 {'I', "info", NULL, gettext_noop ("list currently running services"), 788
789 GNUNET_NO, &GNUNET_GETOPT_set_one, &list}, 789 GNUNET_GETOPT_OPTION_SET_ONE ('r',
790 {'O', "no-stdout", NULL, gettext_noop ("don't let gnunet-service-arm inherit standard output"), 790 "restart",
791 GNUNET_NO, &GNUNET_GETOPT_set_one, &no_stdout}, 791 gettext_noop ("stop and start all GNUnet default services"),
792 {'E', "no-stderr", NULL, gettext_noop ("don't let gnunet-service-arm inherit standard error"), 792 &restart),
793 GNUNET_NO, &GNUNET_GETOPT_set_one, &no_stderr}, 793 GNUNET_GETOPT_OPTION_SET_ONE ('d',
794 "delete",
795 gettext_noop ("delete config file and directory on exit"),
796 &delete),
797
798 GNUNET_GETOPT_OPTION_SET_ONE ('m',
799 "monitor",
800 gettext_noop ("monitor ARM activities"),
801 &monitor),
802
803 GNUNET_GETOPT_OPTION_SET_ONE ('q',
804 "quiet",
805 gettext_noop ("don't print status messages"),
806 &quiet),
807
808 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
809 "timeout",
810 "DELAY",
811 gettext_noop ("exit with error status if operation does not finish after DELAY"),
812 &timeout),
813
814 GNUNET_GETOPT_OPTION_SET_ONE ('I',
815 "info",
816 gettext_noop ("list currently running services"),
817 &list),
818
819 GNUNET_GETOPT_OPTION_SET_ONE ('O',
820 "no-stdout",
821 gettext_noop ("don't let gnunet-service-arm inherit standard output"),
822 &no_stdout),
823
824 GNUNET_GETOPT_OPTION_SET_ONE ('E',
825 "no-stderr",
826 gettext_noop ("don't let gnunet-service-arm inherit standard error"),
827 &no_stderr),
828
794 GNUNET_GETOPT_OPTION_END 829 GNUNET_GETOPT_OPTION_END
795 }; 830 };
796 831