aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-05-10 15:11:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-05-11 13:48:27 +0200
commitb368ee9902eea02c9e4ea4222cc02af0561e6441 (patch)
treeb7fc046ebe6eff658211a9718a3579a374606d82
parent0696c6ca889dc0b154aaa171f9746e3adebfb1a2 (diff)
netwatch-notify: RouterOS v7 path syntax
-rw-r--r--netwatch-notify8
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={