From 82794054dd3eb7c92602d81da9e8d14bfe376c44 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 25 Oct 2021 00:47:33 +0200 Subject: promethues: add metric for sensor count --- files/common/openwrt/sensors-init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/common/openwrt/sensors-init.lua') diff --git a/files/common/openwrt/sensors-init.lua b/files/common/openwrt/sensors-init.lua index a283bfc7..5e2cd0ee 100755 --- a/files/common/openwrt/sensors-init.lua +++ b/files/common/openwrt/sensors-init.lua @@ -6,5 +6,5 @@ local config, err = sensors.read_config('/etc/sensors.json') if not config then error(err) end local num_sensors, err = sensors.setup(config) -if not num_sensors then error(err) end +if num_sensors == nil then error(err) end print(string.format("successfully initialized %d sensor(s)", num_sensors)) -- cgit v1.2.3