i use wireless link as backup to fiber onu link.RF STATION lan side is disabled and only enabled if fiber link to onu is down and disabled again before fiber link is restored.can i replace L1 switch with mikrotik switch with a script in routeros that ether 1 will ping to 192.168.1.1 if ping is successful ether 2 will be disabled if ping fails then only ether 2 will be enabled if ether 1 succeeds to ping 192.168.1.1 then ether 2 disables again

The Netwatch-Tool in RouterOS can be used to monitor an IP-Address
A Basic script could look like this
/tool netwatch
add disabled=no down-script="/interface/ethernet/set ether2 disabled=no" host=192.168.1.1 http-codes="" test-script="" type=icmp up-script="/interface/ethernet/set ether2 disabled=yes"
Do not duplicate requests.