Hi All,
For a project I need to enable/disable the WiFi interface from an external electrical contact. Is possible to use a button and a script to do this?
Thank you
Regards
Alessio
# Checking ether5 link status:
:global "state"
:global "laststate"
/interface ethernet monitor ether5 once do={:set "state" $status}
:if ($"state" != $"laststate") do={
:if ($"state" != "link-ok") do={
# LINK DOWN
/interface disable wlan1
} else {
# LINK UP
/interface enable wlan1
}
:set "laststate" $"state"
}