BRAVO.
Finally something innovative, instead of the usual bullshit.
But try to write better scripts anyway…
I use layer7-protocol instead of the hotspot, for the example. Work on both v6 and v7
:global EventHandler do={
/log info “On $1 is added a new item $2”
:return 0
}
:execute {
:global EventHandler
/ip firewall layer7-protocol print follow-only where [$EventHandler “layer7-protocol” $name]
}
:delay 2s
/ip firewall layer7-protocol add name=123321
Some script like this:
https://help.mikrotik.com/docs/display/ROS/Scripting+examples#Scriptingexamples-Detectnewlogentry
are completely wrong.
Just one example: if the last log have “01:38:31” time and previous “05-26 17:08:05” time,
the “:totime” do not convert “05-26 17:08:05” to some useful to compare the values…
This is one more correct way to detect if some logs are added…
http://forum.mikrotik.com/t/log-entry-and-action-when-occurs/175820/4