diff options
author | Christian Hesse <mail@eworm.de> | 2022-05-12 11:04:43 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-05-12 11:04:43 +0200 |
commit | df547b87a47e279d3f6b744675821621eea5d7b8 (patch) | |
tree | d5b33fb62e10637d70d8d0616437294ceb15ed9f /netwatch-notify | |
parent | 93ec9afe558ef6eba5d513fab359bb5f6618666d (diff) | |
parent | 12655bd58afc3a75fe3e2958bbe130b96f8b9be7 (diff) |
Merge branch 'ros-v7-path-syntax' into next
Diffstat (limited to 'netwatch-notify')
-rw-r--r-- | netwatch-notify | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/netwatch-notify b/netwatch-notify index 34a9e8f..47b7fa1 100644 --- a/netwatch-notify +++ b/netwatch-notify @@ -46,7 +46,7 @@ $ScriptLock $0; -:if ([ / system resource get uptime ] < 5m) do={ +:if ([ /system/resource/get uptime ] < 5m) do={ $LogPrintExit2 info $0 ("System just booted, giving netwatch some time to settle.") true; } @@ -54,8 +54,8 @@ $ScriptLock $0; :set NetwatchNotify [ :toarray "" ]; } -:foreach Host in=[ / tool netwatch find where comment~"notify" disabled=no ] do={ - :local HostVal [ / tool netwatch get $Host ]; +:foreach Host in=[ /tool/netwatch/find where comment~"notify" disabled=no ] do={ + :local HostVal [ /tool/netwatch/get $Host ]; :local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ]; :if ($HostInfo->"notify" = true && $HostInfo->"disabled" != true) do={ @@ -74,7 +74,7 @@ $ScriptLock $0; $LogPrintExit2 info $0 ("Name '" . $HostInfo->"resolve" . [ $IfThenElse ($HostInfo->"resolve" != \ $HostInfo->"hostname") ("' for host '" . $HostInfo->"hostname") "" ] . \ "' resolves to different address " . $Resolve . ", updating.") false; - / tool netwatch set host=$Resolve $Host; + /tool/netwatch/set host=$Resolve $Host; :set ($Metric->"resolve-failed") false; } } on-error={ |