Failover Script?

Is there a v7 compatible failover script that can handle WAN’s that use DHCP?, most of the ones I see on the forum seem to expect the wan to either be static or PPP based.

I’d like to modify one to move a wireguard tunnel on wan failure.

In the end I created several routing rules and tied them to netwatch scripts.

All of the ones for WAN1 have to get disabled before it will failover.