I know this topic has been raised many times but I have not been able to find a solution to my case.
I would like to use the "mode button" to activate / deactivate the wifi on my hAP AC2 following these rules:
- if wlan1 or wlan2 or both are enabled then disable both of them
- if wlan1 and wlan2 are both disabled then enable them both
I made many attempts and with the last attempt I was forced to do a factory reset.
This is my last attempt:
Code: Select all
:local int1 wlan1
:local int2 wlan2
:local status1 [interface get $int1 enabled]
:local status2 [interface get $int2 enabled]
:if ($status1=true) or ($status2=true) do={
/interface disable [/interface find name=$int1,$int2]
};
:if ($status1=false) and ($status2=false) do={
/interface enable [/interface find name=$int1,$int2]
};