Hi, I have tried to get your script to work on my XT12 router and not having much luck.
when I enable the Debug logging in the Router Admin page I then see constant mentions of the following
wan-failover: Debug - failed to set WAN0USBMODEMREADY
I'm wondering if this is because this Router doesn't have a USB port?
Also when I run the script through AMTM and try and view the Status nothing happens and I get the following in the log file
wan-failover: wan-failover is up to date - Version: v2.0.4
If I choose to restart WAN Failover the following is in the log
Jun 3 20:05:45 wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
Jun 3 20:05:45 wan-failover: Restart - Killing wan-failover Process ID: 23444
Jun 3 20:05:45 wan-failover: Restart - Killed wan-failover Process ID: 23444
Jun 3 20:05:45 wan-failover: Restart - Killing wan-failover Process ID: 23445
Jun 3 20:05:45 wan-failover: Restart - Killed wan-failover Process ID: 23445
Jun 3 20:05:45 wan-failover: Cleanup - Deleting IP Rule for 8.8.8.8 to monitor wan0
Jun 3 20:05:45 wan-failover: Cleanup - Deleted IP Rule for 8.8.8.8 to monitor wan0
Jun 3 20:05:46 wan-failover: Cleanup - Deleting IP Rule for 8.8.4.4 to monitor wan1
Jun 3 20:05:46 wan-failover: Cleanup - Deleted IP Rule for 8.8.4.4 to monitor wan1
Jun 3 20:05:46 wan-failover: Cleanup - Deleting /var/lock/wan-failover.lock
Jun 3 20:05:46 wan-failover: Cleanup - Deleted /var/lock/wan-failover.lock
Jun 3 20:05:46 wan-failover: Cleanup - Deleting /var/run/wan-failover.pid
Jun 3 20:05:46 wan-failover: Cleanup - Deleted /var/run/wan-failover.pid
Jun 3 20:05:46 wan-failover: Cleanup - Deleting /tmp/wan0packetloss.tmp
Jun 3 20:05:46 wan-failover: Cleanup - Deleted /tmp/wan0packetloss.tmp
Jun 3 20:05:46 wan-failover: Cleanup - Deleting /tmp/wan1packetloss.tmp
Jun 3 20:05:46 wan-failover: Cleanup - Deleted /tmp/wan1packetloss.tmp
Jun 3 20:05:46 wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
Jun 3 20:06:01 wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 31181 31187
Jun 3 20:06:03 wan-failover: System Check - Process ID: 31187
Jun 3 20:06:03 wan-failover: System Check - Version: v2.0.4
Jun 3 20:06:03 wan-failover: System Check - Checksum: 663eb976dc5bbde96b1c243234377929dcaa768d63799e8c7c9520fb0e825906
Jun 3 20:06:03 wan-failover: System Check - IP Version: 5.11.0
Jun 3 20:06:03 wan-failover: wan-failover is up to date - Version: v2.0.4
Jun 3 20:06:03 wan-failover: System Check - Process Priority: 0
Jun 3 20:06:11 wan-failover: WAN Status - wan0 enabled
Jun 3 20:06:14 wan-failover: WAN Status - Adding IP Rule for 8.8.8.8 to monitor wan0
Jun 3 20:06:14 wan-failover: WAN Status - Added IP Rule for 8.8.8.8 to monitor wan0
Jun 3 20:06:16 wan-failover: WAN Status - wan0 has 0% packet loss
Jun 3 20:06:16 wan-failover: WAN Status - wan0 has a 11ms ping time
Jun 3 20:06:17 wan-failover: WAN Status - wan1 enabled
Jun 3 20:06:20 wan-failover: WAN Status - Adding IP Rule for 8.8.4.4 to monitor wan1
Jun 3 20:06:20 wan-failover: WAN Status - Added IP Rule for 8.8.4.4 to monitor wan1
Jun 3 20:06:22 wan-failover: WAN Status - wan1 has 0% packet loss
Jun 3 20:06:22 wan-failover: WAN Status - wan1 has a 6ms ping time
Jun 3 20:06:30 wan-failover: Check IP Rules - Adding IPTables - OUTPUT MANGLE match rule for eth1 marked with 0x90000000
Jun 3 20:06:30 wan-failover: Check IP Rules - Added IPTables - OUTPUT MANGLE match rule for eth1 marked with 0x90000000
Any help would be appreciated.
Regards,
Colin