MikroTik Scripting – Disable & Enable Interface

#SCRIPT BY NAME
#VARIABEL
:local macaddr "94:F1:28:AF:47:D8";
:local nameiface [/interface ethernet get value-name=name [find where mac-address=$macaddr]];

/interface/ethernet/set disabled=yes "$nameiface";
/log/warning message="disable interface $nameiface";
/log/warning message="menunggu 10 detik akan di enable kembali"
/delay 10s;
interface/ethernet/set disabled=no "$nameiface";
/log/warning message="interface $nameiface sudah di enable kembali"
/log/warning  message="task selesai";