aboutsummaryrefslogtreecommitdiffstats
path: root/check-health
diff options
context:
space:
mode:
Diffstat (limited to 'check-health')
-rw-r--r--check-health22
1 files changed, 11 insertions, 11 deletions
diff --git a/check-health b/check-health
index 55ad8ab..a9a9dbf 100644
--- a/check-health
+++ b/check-health
@@ -33,17 +33,6 @@
:return ($T->0 * 10 + $T->1);
}
-:if ([ :len [ /system/health/find ] ] = 0) do={
- $LogPrintExit2 error $0 ("Your device does not provide any health values.") true;
-}
-
-:if ([ :typeof $CheckHealthLast ] != "array") do={
- :set CheckHealthLast ({});
-}
-:if ([ :typeof $CheckHealthTemperatureNotified ] != "array") do={
- :set CheckHealthTemperatureNotified ({});
-}
-
$ScriptLock $0;
:local Resource [ /system/resource/get ];
@@ -78,6 +67,17 @@ $ScriptLock $0;
:set CheckHealthFreeRAMNotified false;
}
+:if ([ :len [ /system/health/find ] ] = 0) do={
+ $LogPrintExit2 debug $0 ("Your device does not provide any health values.") true;
+}
+
+:if ([ :typeof $CheckHealthLast ] != "array") do={
+ :set CheckHealthLast ({});
+}
+:if ([ :typeof $CheckHealthTemperatureNotified ] != "array") do={
+ :set CheckHealthTemperatureNotified ({});
+}
+
:foreach Voltage in=[ /system/health/find where type="V" ] do={
:local Name [ /system/health/get $Voltage name ];