mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 10:19:27 +08:00
skip temperatures code if sensors whitelist is set to empty string
This commit is contained in:
@@ -171,7 +171,8 @@ func (a *Agent) getSystemStats() system.Stats {
|
||||
}
|
||||
}
|
||||
|
||||
// temperatures
|
||||
// temperatures (skip if sensors whitelist is set to empty string)
|
||||
if a.sensorsWhitelist == nil || len(a.sensorsWhitelist) > 0 {
|
||||
temps, err := sensors.TemperaturesWithContext(a.sensorsContext)
|
||||
if err != nil {
|
||||
// err.(*sensors.Warnings).Verbose = true
|
||||
@@ -202,6 +203,7 @@ func (a *Agent) getSystemStats() system.Stats {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update base system info
|
||||
a.systemInfo.Cpu = systemStats.Cpu
|
||||
|
Reference in New Issue
Block a user