mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-06-21 01:15:43 +02:00
14 lines
No EOL
378 B
Text
14 lines
No EOL
378 B
Text
# filename: ch7-09-if-binary-simplified.rsc
|
|
|
|
# define WAN interface name
|
|
:local WanInterfaceName "ether1-WAN";
|
|
|
|
# find the interface index
|
|
:local InterfaceIndex [/interface ethernet find name=$WanInterfaceName];
|
|
|
|
:local UpDown "down";
|
|
if ([:interface ethernet get $InterfaceIndex]->"running") do={
|
|
:set UpDown "up"
|
|
}
|
|
|
|
:put "Interface $WanInterface is currently $UpDown"; |