[transport-tcp]
PORT = 2086
TIMEOUT = 300000
-ALLOW_SHUTDOWN = NO
# MAXBUF =
# DISABLEV6 =
# BINDTO =
BINARY = gnunet-service-arm
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
DEFAULTSERVICES = resolver transport core topology hostlist
# GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
# GLOBAL_PREFIX =
# PREFIX =
[statistics]
+AUTOSTART = YES
PORT = 2088
HOSTNAME = localhost
HOME = $SERVICEHOME
BINARY = gnunet-service-statistics
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
# PREFIX =
[resolver]
+AUTOSTART = YES
PORT = 2089
HOSTNAME = localhost
HOME = $SERVICEHOME
BINARY = gnunet-service-resolver
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
# PREFIX =
[peerinfo]
+AUTOSTART = YES
PORT = 2090
HOSTNAME = localhost
HOME = $SERVICEHOME
BINARY = gnunet-service-peerinfo
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
[transport]
+AUTOSTART = YES
PORT = 2091
HOSTNAME = localhost
HOME = $SERVICEHOME
NEIGHBOUR_LIMIT = 50
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
PLUGINS = tcp
# USERNAME =
# MAXBUF =
# PREFIX =
[core]
+AUTOSTART = YES
PORT = 2092
HOSTNAME = localhost
HOME = $SERVICEHOME
BINARY = gnunet-service-core
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# quotas are in bytes per second now!
TOTAL_QUOTA_IN = 65536
TOTAL_QUOTA_OUT = 65536
[datastore]
+AUTOSTART = YES
PORT = 2093
HOSTNAME = localhost
HOME = $SERVICEHOME
BINARY = gnunet-service-datastore
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
QUOTA = 100000000
BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
DATABASE = sqlite
FILENAME = $SERVICEHOME/datastore/sqlite.db
[fs]
+AUTOSTART = YES
INDEXDB = $SERVICEHOME/idxinfo.lst
IDENTITY_DIR = $SERVICEHOME/identities/
STATE_DIR = $SERVICEHOME/persistence/
BINARY = gnunet-service-fs
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# DEBUG = YES
unsigned int i;
if ( (strcasecmp (section, "arm") == 0) ||
- (strcasecmp (option, "PORT") != 0) ||
+ (strcasecmp (option, "AUTOSTART") != 0) ||
+ (strcasecmp (value, "YES") != 0) ||
(isInDefaultList (section) == GNUNET_YES) )
return;
if (0 >= (ret = GNUNET_SERVICE_get_server_addresses (section, cfg, &addrs,
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_TRANSPORT_Handle *th;
struct GNUNET_MessageHeader *hello;
- struct GNUNET_ARM_Handle *arm;
#if START_ARM
pid_t arm_pid;
#endif
"-c", cfgname, NULL);
#endif
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
- GNUNET_ARM_start_services (p->cfg, sched, "core", NULL);
p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, p, NULL,
¬ify_connect, NULL);
GNUNET_assert (p->th != NULL);
static void
-stop_cb (void *cls,
- int success)
+stop_arm (struct PeerContext *p)
{
- struct PeerContext *p = cls;
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- success
- ? "ARM stopped core service\n"
- : "ARM failed to stop core service\n");
- GNUNET_ARM_disconnect (p->arm);
- p->arm = NULL;
- /* make sure this runs after all other tasks are done */
+ "Asking ARM to stop core service\n");
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_TIME_UNIT_SECONDS,
&waitpid_task, p);
}
-static void
-stop_arm (struct PeerContext *p)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Asking ARM to stop core service\n");
- p->arm = GNUNET_ARM_connect (p->cfg, sched, NULL);
- GNUNET_ARM_stop_service (p->arm, "core", GNUNET_TIME_UNIT_SECONDS,
- &stop_cb, p);
-}
-
-
/**
* Try again to connect to transport service.
*/
[arm]
PORT = 12966
-DEFAULTSERVICES = resolver transport core statistics topology
+DEFAULTSERVICES = hostlist topology
#GLOBAL_PREFIX = xterm -e gdb -x cmd --args
[statistics]
[topology]
#DEBUG = YES
#PREFIX = valgrind --tool=memcheck
-DEBUG = NO
\ No newline at end of file
+DEBUG = NO
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO[fs]
[arm]
PORT = 22966
-DEFAULTSERVICES = resolver transport core statistics topology
+DEFAULTSERVICES = hostlist topology
#GLOBAL_PREFIX = xterm -e gdb -x cmd --args
DEBUG = NO
#DEBUG = YES
#PREFIX = valgrind --tool=memcheck
DEBUG = NO
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO
\ No newline at end of file
*/
int require_found;
- /**
- * Can clients ask us to initiate a shutdown?
- */
- int allow_shutdown;
-
/**
* Our options.
*/
* - TIMEOUT (after how many ms does an inactive service timeout);
* - MAXBUF (maximum incoming message size supported)
* - DISABLEV6 (disable support for IPv6, otherwise we use dual-stack)
- * - ALLOW_SHUTDOWN (allow clients to shutdown this service)
* - BINDTO (hostname or IP address to bind to, otherwise we take everything)
* - ACCEPT_FROM (only allow connections from specified IPv4 subnets)
* - ACCEPT_FROM6 (only allow connections from specified IPv6 subnets)
}
else
maxbuf = GNUNET_SERVER_MAX_MESSAGE_SIZE;
- if (GNUNET_CONFIGURATION_have_value (sctx->cfg,
- sctx->serviceName, "ALLOW_SHUTDOWN"))
- {
- if (GNUNET_SYSERR ==
- (sctx->allow_shutdown =
- GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg, sctx->serviceName,
- "ALLOW_SHUTDOWN")))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Specified value for `%s' of service `%s' is invalid\n"),
- "ALLOW_SHUTDOWN",
- sctx->serviceName);
- return GNUNET_SYSERR;
- }
- }
- else
- sctx->allow_shutdown = GNUNET_NO;
-
if (GNUNET_CONFIGURATION_have_value (sctx->cfg,
sctx->serviceName, "TOLERANT"))
}
-/**
- * Main method, starts scheduler with task1,
- * checks that "ok" is correct at the end.
- */
-static int
-check6d ()
-{
- ok = 1;
- char *const argv[] = {
- "test_service6",
- "-c",
- "test_service_data.conf",
- "-L",
-#if VERBOSE
- "DEBUG",
-#else
- "WARNING",
-#endif
- "-d",
- NULL
- };
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting V6 as daemon\n");
- GNUNET_assert (GNUNET_OK ==
- GNUNET_SERVICE_run (6,
- argv,
- "test_service6",
- GNUNET_SERVICE_OPTION_NONE,
- &runner6, &ok));
- GNUNET_break (0 == ok);
- return ok;
-}
-
static void
start_stop_main (void *cls,
{
GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (s));
ret += check6 ();
- ret += check6d (); /* with daemonization */
}
ret += check_start_stop ();
ACCEPT_FROM6=::1;
REJECT_FROM6=AB:CD:EF::00;AB:CD::00/40;
HOSTNAME=localhost
-ALLOW_SHUTDOWN=YES
[test_service6]
PORT=12435
ACCEPT_FROM6=::1;
REJECT_FROM6=AB:CD:EF::00;AB:CD::00/40;
HOSTNAME=::1
-ALLOW_SHUTDOWN=YES
[resolver]
HOSTNAME=localhost