add SYSTEM_NAME env var (#1184)

This commit is contained in:
henrygd
2025-10-03 13:44:10 -04:00
parent adda381d9d
commit cca7b36039
3 changed files with 8 additions and 3 deletions

View File

@@ -196,6 +196,7 @@ func (client *WebSocketClient) handleAuthChallenge(msg *common.HubRequest[cbor.R
}
if authRequest.NeedSysInfo {
response.Name, _ = GetEnv("SYSTEM_NAME")
response.Hostname = client.agent.systemInfo.Hostname
serverAddr := client.agent.connectionManager.serverOptions.Addr
_, response.Port, _ = net.SplitHostPort(serverAddr)