aboutsummaryrefslogtreecommitdiffstats
path: root/check-health
diff options
context:
space:
mode:
Diffstat (limited to 'check-health')
-rw-r--r--check-health4
1 files changed, 4 insertions, 0 deletions
diff --git a/check-health b/check-health
index 86df9ea..c27178d 100644
--- a/check-health
+++ b/check-health
@@ -22,6 +22,10 @@
:local CheckHealthCurrent [ / system health get ];
+:if ([ :len $CheckHealthCurrent ] = 0) do={
+ $LogPrintExit error ("Your device does not provide any health values.") true;
+}
+
:foreach Voltage in={ "battery"; "psu1-voltage"; "psu2-voltage"; "voltage" } do={
:if ([ :typeof ($CheckHealthLast->$Voltage) ] = "num" && \
[ :typeof ($CheckHealthCurrent->$Voltage) ] = "num") do={