summaryrefslogtreecommitdiffstats
path: root/claim/claim.c
diff options
context:
space:
mode:
authorAndrew Moss <1043609+amoss@users.noreply.github.com>2020-03-31 13:07:24 +0200
committerGitHub <noreply@github.com>2020-03-31 13:07:24 +0200
commitfe722cb2a48c074eb7e2739c5052a28d4aa97d56 (patch)
tree3e302830f3343346fcf2a7a0a979bab9ded34754 /claim/claim.c
parentcf948d42c22093db5d5085b3b453f7bcc2d52ae3 (diff)
Improve the behavior of claiming (#8516)
The default cloud url has been updated to app.netdata.cloud ready for the release. The claiming process now checks the current user executing claiming and refuses to perform the claim for the wrong user. If the current UID is 0 then claiming proceeds but the file ownership is adjusted to be the correct netdata user. The default expected user is `netdata` unless the script can identify the user from the current configuration. After the claiming script is executed the CLI is used to reload the claiming state.
Diffstat (limited to 'claim/claim.c')
-rw-r--r--claim/claim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/claim/claim.c b/claim/claim.c
index 5d17ae9075..aabcc18a23 100644
--- a/claim/claim.c
+++ b/claim/claim.c
@@ -53,7 +53,7 @@ void claim_agent(char *claiming_arguments)
char *cloud_base_hostname = NULL; // Initializers are over-written but prevent gcc complaining about clobbering.
char *cloud_base_port = NULL;
- char *cloud_base_url = config_get(CONFIG_SECTION_CLOUD, "cloud base url", "https://netdata.cloud");
+ char *cloud_base_url = config_get(CONFIG_SECTION_CLOUD, "cloud base url", DEFAULT_CLOUD_BASE_URL);
if( aclk_decode_base_url(cloud_base_url, &cloud_base_hostname, &cloud_base_port))
{
error("Configuration error - cannot decode \"cloud base url\"");
@@ -71,7 +71,7 @@ void claim_agent(char *claiming_arguments)
snprintfz(command_buffer,
CLAIMING_COMMAND_LENGTH,
- "exec netdata-claim.sh %s -hostname=%s -id=%s -url=%s %s",
+ "exec netdata-claim.sh %s -hostname=%s -id=%s -url=%s -noreload %s",
proxy_flag,
netdata_configured_hostname,