wyłącza/włącza POE-OUT 12-05-2015 21:00:00
Skrypt ma za zadanie wyłączyć oraz z opóźnieniem włączyć POE-OUT w interfejs. #1 kod skryptu
/system script add name=DownUpPoeOUT policy=write,read,test,policy source={
:local ipPing "1.1.1.1";
:local ilePing 5;
:local ilePingOK 3;
:local interfejs "ether2";
:local opoznienie "10s";
:local stanWylaczony "off";
:local stanWlaczony "forced-on";
:local ping [/ping $ipPing count=$ilePing];
:if ($ilePingOK >= $ping) do={
/interface ethernet set $interfejs poe-out=$stanWylaczony
:delay $opoznienie
/interface ethernet set $interfejs poe-out=$stanWlaczony
}
}
#1 wykonywanie skryptu co 30 sekund
/system scheduler add name="run DownUpPoeOUT" disabled=no interval=00:00:30 on-event="/system script run DownUpPoeOUT\r\n" |






12-05-2015 21:00:00