mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-06-29 17:27:25 +02:00
Add a new script to toggle wifi via mode button
This commit is contained in:
parent
40e85a2ee9
commit
55320e161e
1 changed files with 20 additions and 0 deletions
20
scripts/wifi-button.rsc
Normal file
20
scripts/wifi-button.rsc
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Ref: https://gist.github.com/sebastian13/47e788371474d73552593b621eeacd33
|
||||
|
||||
: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 };
|
||||
}
|
||||
|
||||
# Wifi disable
|
||||
# :if ( [/int wir get 0 disabled ] = true ) do={} else={
|
||||
# :foreach i in= [ /int wir find ] do={ :int wir disable $i };
|
||||
# }
|
||||
|
||||
# Wifi enable
|
||||
# :if ( [/int wir get 0 disabled ] = true ) do={
|
||||
# :foreach i in= [ /int wir find ] do={ :int wir enable $i };
|
||||
# }
|
Loading…
Add table
Add a link
Reference in a new issue