Skip to content

Commit

Permalink
core/config: Fix _regid/regid confusion.
Browse files Browse the repository at this point in the history
Closes #22.
  • Loading branch information
wdoekes committed May 4, 2017
1 parent 5162d37 commit dfc698b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gocollect.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ register_url = http://localhost:8000/register/

# push_url: Specify URL where to post the data.
# The {ip4} and {fqdn} parameters are taken from the core.id script.
# The {regid} parameter is the (unique) identifier obtained from
# the registry; also taken from the core.id script.
# The {_collector} parameter is the collector name/key.
# The {_regid} parameter is the (unique) identifier obtained from
# the registry.
#
# For now, we've decided to do without auth on the collector server.
# We won't do automatic billing based on the imported values and the
Expand Down
3 changes: 1 addition & 2 deletions gocollector/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ func register(registerURL string, coreIDData Collected,
}

os.MkdirAll(path.Dir(regidFilename), 0755)
err = ioutil.WriteFile(
"/var/lib/gocollect/core.id.regid", []byte(value), 0400)
err = ioutil.WriteFile(regidFilename, []byte(value), 0400)
if err != nil {
logger.Fatal("Could not write core.id.regid: ", err)
return false
Expand Down

0 comments on commit dfc698b

Please sign in to comment.