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