mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-06-24 02:28:40 +02:00
initial commit
This commit is contained in:
commit
c782dde326
61 changed files with 1457 additions and 0 deletions
14
scripts/ch7-09-if-binary-simplified.rsc
Normal file
14
scripts/ch7-09-if-binary-simplified.rsc
Normal file
|
@ -0,0 +1,14 @@
|
|||
# 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";
|
Loading…
Add table
Add a link
Reference in a new issue