Skip to content

Instantly share code, notes, and snippets.

@sebastian13
Created May 14, 2021 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastian13/47e788371474d73552593b621eeacd33 to your computer and use it in GitHub Desktop.
Save sebastian13/47e788371474d73552593b621eeacd33 to your computer and use it in GitHub Desktop.
Script to enable & disable wifi on a Mikrotik (standalone) Access Point using the Mode Button
:log info message=("mode button was pressed");
:local i
:if ( [/int wir get 0 disabled ] = true ) do={
:foreach i in= [ /int wir find ] do={ :int wir enable $i };
} else={
:foreach i in= [ /int wir find ] do={ :int wir disable $i };
}
:if ( [/int wir get 0 disabled ] = true ) do={} else={
:foreach i in= [ /int wir find ] do={ :int wir disable $i };
}
:if ( [/int wir get 0 disabled ] = true ) do={
:foreach i in= [ /int wir find ] do={ :int wir enable $i };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment