Hi,
Can someone help me in this simple script? I'd like to ping ISP1 and if there is no answer, the script should enable the second (Failover) interface.
# Please fill the WAN interface names
:local InterfaceISP1 ether1;
:local InterfaceISP2 myLTE;
# Please fill the gateway IPs
:local GatewayISP1 192.168.50.1;
:local GatewayISP2 192.168.30.1;
# Please fill the ping check host - currently: google.com
:local PingTarget 8.8.8.8;
:local PingResult 0;
# Editing the script after this point may break it
# -------------- stop editing here --------------
:if (ping $PingTarget count=1 interface=$InterfaceISP1 != 0) do={ /interface enable $InterfaceISP2; } else={ /interface enable $InterfaceISP2; }