fix lowercase hostname
This commit is contained in:
parent
9f3f5c2f9b
commit
9f22576136
1 changed files with 6 additions and 1 deletions
|
|
@ -104,6 +104,11 @@ func New(logger *logrus.Logger, version string) *Agent {
|
||||||
winTempDir := defaultWinTmpDir
|
winTempDir := defaultWinTmpDir
|
||||||
winRunAsUserTmpDir := defaultWinTmpDir
|
winRunAsUserTmpDir := defaultWinTmpDir
|
||||||
|
|
||||||
|
hostname, err := os.Hostname()
|
||||||
|
if err != nil {
|
||||||
|
hostname = info.Hostname
|
||||||
|
}
|
||||||
|
|
||||||
var pybin string
|
var pybin string
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "amd64":
|
case "amd64":
|
||||||
|
|
@ -201,7 +206,7 @@ func New(logger *logrus.Logger, version string) *Agent {
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Agent{
|
return &Agent{
|
||||||
Hostname: info.Hostname,
|
Hostname: hostname,
|
||||||
BaseURL: ac.BaseURL,
|
BaseURL: ac.BaseURL,
|
||||||
AgentID: ac.AgentID,
|
AgentID: ac.AgentID,
|
||||||
ApiURL: ac.APIURL,
|
ApiURL: ac.APIURL,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue