diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-09 10:05:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-09 10:05:42 +0000 |
commit | 2032baa561c7fefbe2605f5d6b979a295a61637d (patch) | |
tree | 2c2a2f1c92940a51ccb565c8fdc1b381a68d8bb4 /src/arm | |
parent | 0f6f7fdb0ee4172951f8cb1431d2e457a4b83716 (diff) | |
download | gnunet-2032baa561c7fefbe2605f5d6b979a295a61637d.tar.gz gnunet-2032baa561c7fefbe2605f5d6b979a295a61637d.zip |
migrating towards XDG configuration specification (#3000)
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/arm.conf.in | 3 | ||||
-rw-r--r-- | src/arm/gnunet-arm.c | 22 | ||||
-rw-r--r-- | src/arm/test_arm_api_data.conf | 1 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/arm/arm.conf.in b/src/arm/arm.conf.in index b9a33242f..1b079c98c 100644 --- a/src/arm/arm.conf.in +++ b/src/arm/arm.conf.in | |||
@@ -2,7 +2,6 @@ | |||
2 | [arm] | 2 | [arm] |
3 | @UNIXONLY@ PORT = 2087 | 3 | @UNIXONLY@ PORT = 2087 |
4 | HOSTNAME = localhost | 4 | HOSTNAME = localhost |
5 | HOME = $SERVICEHOME | ||
6 | BINARY = gnunet-service-arm | 5 | BINARY = gnunet-service-arm |
7 | ACCEPT_FROM = 127.0.0.1; | 6 | ACCEPT_FROM = 127.0.0.1; |
8 | ACCEPT_FROM6 = ::1; | 7 | ACCEPT_FROM6 = ::1; |
@@ -16,7 +15,7 @@ UNIX_MATCH_GID = YES | |||
16 | # service. Thus the following option would introduce per-service | 15 | # service. Thus the following option would introduce per-service |
17 | # logging with a new log file each day. Note that only the last 3 | 16 | # logging with a new log file each day. Note that only the last 3 |
18 | # log files are preserved. | 17 | # log files are preserved. |
19 | # GLOBAL_POSTFIX = -l $SERVICEHOME/{}-%Y-%m-%d.log | 18 | # GLOBAL_POSTFIX = -l $GNUNET_CACHE_HOME/{}-%Y-%m-%d.log |
20 | GLOBAL_PREFIX = @MONKEYPREFIX@ | 19 | GLOBAL_PREFIX = @MONKEYPREFIX@ |
21 | # USERNAME = | 20 | # USERNAME = |
22 | # MAXBUF = | 21 | # MAXBUF = |
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 80d3e9c03..a492fac5b 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -147,7 +147,7 @@ static unsigned int no_stderr; | |||
147 | 147 | ||
148 | 148 | ||
149 | /** | 149 | /** |
150 | * Attempts to delete configuration file and SERVICEHOME | 150 | * Attempts to delete configuration file and GNUNET_HOME |
151 | * on ARM shutdown provided the end and delete options | 151 | * on ARM shutdown provided the end and delete options |
152 | * were specified when gnunet-arm was run. | 152 | * were specified when gnunet-arm was run. |
153 | */ | 153 | */ |
@@ -158,15 +158,17 @@ delete_files () | |||
158 | "Will attempt to remove configuration file %s and service directory %s\n", | 158 | "Will attempt to remove configuration file %s and service directory %s\n", |
159 | config_file, dir); | 159 | config_file, dir); |
160 | 160 | ||
161 | if (UNLINK (config_file) != 0) | 161 | if (0 != UNLINK (config_file)) |
162 | { | 162 | { |
163 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 163 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
164 | _("Failed to remove configuration file %s\n"), config_file); | 164 | _("Failed to remove configuration file %s\n"), |
165 | config_file); | ||
165 | } | 166 | } |
166 | if (GNUNET_DISK_directory_remove (dir) != GNUNET_OK) | 167 | if (GNUNET_OK != GNUNET_DISK_directory_remove (dir)) |
167 | { | 168 | { |
168 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 169 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
169 | _("Failed to remove servicehome directory %s\n"), dir); | 170 | _("Failed to remove servicehome directory %s\n"), |
171 | dir); | ||
170 | 172 | ||
171 | } | 173 | } |
172 | } | 174 | } |
@@ -192,8 +194,8 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
192 | GNUNET_ARM_monitor_disconnect_and_free (m); | 194 | GNUNET_ARM_monitor_disconnect_and_free (m); |
193 | m = NULL; | 195 | m = NULL; |
194 | } | 196 | } |
195 | if ((end == GNUNET_YES) && (delete == GNUNET_YES)) | 197 | if ((GNUNET_YES == end) && (GNUNET_YES == delete)) |
196 | delete_files (); | 198 | delete_files (); |
197 | GNUNET_CONFIGURATION_destroy (cfg); | 199 | GNUNET_CONFIGURATION_destroy (cfg); |
198 | cfg = NULL; | 200 | cfg = NULL; |
199 | } | 201 | } |
@@ -588,7 +590,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
588 | if (list) | 590 | if (list) |
589 | { | 591 | { |
590 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 592 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
591 | "Going to list all running services controlled by ARM.\n"); | 593 | "Going to list all running services controlled by ARM.\n"); |
592 | GNUNET_ARM_request_service_list (h, | 594 | GNUNET_ARM_request_service_list (h, |
593 | (0 == timeout.rel_value_us) ? LIST_TIMEOUT : timeout, | 595 | (0 == timeout.rel_value_us) ? LIST_TIMEOUT : timeout, |
594 | &list_callback, &list); | 596 | &list_callback, &list); |
@@ -673,10 +675,10 @@ run (void *cls, | |||
673 | cfg = GNUNET_CONFIGURATION_dup (c); | 675 | cfg = GNUNET_CONFIGURATION_dup (c); |
674 | config_file = cfgfile; | 676 | config_file = cfgfile; |
675 | if (GNUNET_OK != | 677 | if (GNUNET_OK != |
676 | GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME", &dir)) | 678 | GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "GNUNET_HOME", &dir)) |
677 | { | 679 | { |
678 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 680 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
679 | "PATHS", "SERVICEHOME"); | 681 | "PATHS", "GNUNET_HOME"); |
680 | return; | 682 | return; |
681 | } | 683 | } |
682 | if (NULL != cfgfile) | 684 | if (NULL != cfgfile) |
diff --git a/src/arm/test_arm_api_data.conf b/src/arm/test_arm_api_data.conf index 157a03027..1f1ac282f 100644 --- a/src/arm/test_arm_api_data.conf +++ b/src/arm/test_arm_api_data.conf | |||
@@ -16,7 +16,6 @@ PORT = 23355 | |||
16 | AUTOSTART = NO | 16 | AUTOSTART = NO |
17 | PORT = 2223 | 17 | PORT = 2223 |
18 | HOSTNAME = localhost | 18 | HOSTNAME = localhost |
19 | HOME = $SERVICEHOME | ||
20 | BINARY = /will/be/overwritten/by/test_exponential_backoff | 19 | BINARY = /will/be/overwritten/by/test_exponential_backoff |
21 | ACCEPT_FROM = 127.0.0.1; | 20 | ACCEPT_FROM = 127.0.0.1; |
22 | ACCEPT_FROM6 = ::1; | 21 | ACCEPT_FROM6 = ::1; |