#skript PrimaryUp
#smaz scheduler
:global pocetUkolu [/system scheduler print count-only ];
if ($pocetUkolu>0) do={
system scheduler print;
if ([system scheduler get value-name=name number=0]="CheckSpeed")
do={/system scheduler remove CheckSpeed;
}
#skript pocet aktivnich adres
:global pocetAdres [/ip address print count-only ];
:global aktivAdr [/ip address print count-only ];
:for pocetAdres from=$aktivAdr to=1 do={:if [/ip address get
value-name=disabled ($pocetAdres-1)] do={:set aktivAdr ($aktivAdr-1)}};
:put $aktivAdr;
#pocet manualnich rout
:global routy ([/ip route print count-only]-$aktivAdr);
#odstraneni zaznamu z routovaci tabulky
:while ($routy>0) do={/ip route print ; /ip route remove numbers=0 ;
:set routy ($routy-1)};
#nastav routy
/ip route add dst-address=0.0.0.0/0 gateway=172.16.1.2 distance=20
check-gateway=ping;
