I am trying to learn script.
Can someone show me how i would do a simple script. To ping an ip address and if no reply shutdown gateways
0 A S ;;; Cable
0.0.0.0/0 reachable 192.168.0.1 1 ether1
1 S ;;; Telefonica
0.0.0.0/0 reachable 192.168.9.10 2 ether2
2 ADC 192.168.0.0/24 192.168.0.251 0 ether1
3 ADC 192.168.9.0/24 192.168.9.100 0 ether2
I want to setup a ping from both ethers to the modem gateways, if the is no ping it turns off the gateway and turns on the other gatweay
/ip route disable 0 or /ip route disable 1 would be a good starting point how to turn things on and off etc.
I have looked at the Wiki and just trying to get an understanding of what i think would be a basic script.
Can any advise me.