Last active
December 17, 2021 11:03
-
-
Save sebastian13/5655efab2b51f0f3572352acbb640c48 to your computer and use it in GitHub Desktop.
Script to enable & disable wifi on a Mikrotik cAP Access Point managed by a CAPsMAN using the Mode Button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:if ([/int wir cap get enabled] = true) do={ | |
/interface wireless cap set enabled=no; | |
:if ( [/int wir get 0 disabled ] = false ) do={ | |
:foreach i in= [ /int wir find ] do={ :int wir disable $i }; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:if ( [/int wir cap get enabled ] = false ) do={ | |
/interface wireless cap set enabled=yes | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the code. But how you actually use it ?
I have a hex S router with cAP lite and would like to use mode bouton to turn on and off the wifi.
I would appreciate any help on how to implement this. Thanks