mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-25 10:57:47 +02:00
feat: add SYNC_SYSTEM_NAMES env var to sync system names with hostname (#1917)
This commit is contained in:
@@ -279,6 +279,10 @@ func (sys *System) createRecords(data *system.CombinedData) (*core.Record, error
|
||||
if err := createSystemDetailsRecord(txApp, data.Details, sys.Id); err != nil {
|
||||
return err
|
||||
}
|
||||
// sync display name with hostname if enabled (details are fetched once per agent connection)
|
||||
if syncNames, _ := utils.GetEnv("SYNC_SYSTEM_NAMES"); syncNames == "true" && data.Details.Hostname != "" {
|
||||
systemRecord.Set("name", data.Details.Hostname)
|
||||
}
|
||||
}
|
||||
|
||||
if data.Monitors != nil {
|
||||
|
||||
Reference in New Issue
Block a user