Skip to content

Instantly share code, notes, and snippets.

View Tommasov's full-sized avatar
😀
Developing

Tommaso Vietina Tommasov

😀
Developing
View GitHub Profile
@Tommasov
Tommasov / gist:836476858ed384ed609d4aff1778f5a0
Created December 21, 2023 14:48
Mikrotik Netwatch status "Test"
:global timeoutLTE 60
:local i 0
:local isLTEinit false
:while ($i<$timeoutLTE) do={
:foreach n in=[/interface lte find] do={:set $isLTEinit true}
:if ($isLTEinit=true) do={
:set $i $timeoutLTE
}
@Tommasov
Tommasov / gist:9bc0c7eabb8299861b74679b0d97794e
Created December 21, 2023 14:47
Mikrotik Netwatch status "Down"
:log error "(Netwatch) Internet disconnesso";
:if ([/interface lte get [find name="lte1"] running]=true) do={
:log info "(Netwatch) lte1 disabilitata";
/interface lte disable lte1;
:log info "(Netwatch) Attendo 5 secondi...";
:delay 5000ms;
:log info "(Netwatch) lte1 abilitata";
/interface lte enable lte1;
}