mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 10:19:27 +08:00
fix: skip temperature collection if SENSORS is empty string (#196)
This commit is contained in:
@@ -62,7 +62,9 @@ func (a *Agent) Run(pubKey []byte, addr string) {
|
||||
if sensors, exists := os.LookupEnv("SENSORS"); exists {
|
||||
a.sensorsWhitelist = make(map[string]struct{})
|
||||
for _, sensor := range strings.Split(sensors, ",") {
|
||||
a.sensorsWhitelist[sensor] = struct{}{}
|
||||
if sensor != "" {
|
||||
a.sensorsWhitelist[sensor] = struct{}{}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user