netwatch-notify: drop the delay on startup...

... now that in RouterOS 7.9 netwatch itself comes with a startup-delay.
Hosts in state 'unknown' are just ignored.
This commit is contained in:
Christian Hesse 2023-05-31 15:24:16 +02:00
parent 3ed124a013
commit 6247b739a1
2 changed files with 4 additions and 4 deletions

View file

@ -3,6 +3,8 @@ Notify on host up and down
[⬅️ Go back to main README](../README.md)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.9beta4-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
> **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.

View file

@ -3,6 +3,8 @@
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.9beta4
#
# monitor netwatch and send notifications
# https://git.eworm.de/cgit/routeros-scripts/about/doc/netwatch-notify.md
@ -54,10 +56,6 @@ $ScriptLock $0;
:local ScriptFromTerminalCached [ $ScriptFromTerminal $0 ];
:if ([ /system/resource/get uptime ] < 5m) do={
$LogPrintExit2 info $0 ("System just booted, giving netwatch some time to settle.") true;
}
:if ([ :typeof $NetwatchNotify ] = "nothing") do={
:set NetwatchNotify ({});
}