Establish a L2L tunnel on wan failover

Hi,

Having a mikrotik router with two wan interfaces, one connected to the ISP router and a second one with lte, Could it be conifigured to establish a L2L tunnel through the lte interface ONLY when the wan goes down?

I have seen examples to change the routing when one interface falls down, but i would to also establish a l2l tunnel and shut it down automatically when the wan connection recovers.

Could it be possible?

Greetings.

Add static route to the L2 vpn server ip address through LTE interface.Add l2tp-out /L2TP client/ and use netwatch to check main gateway , when is on down execute /interface ppp-client enable l2tp-out1 or when is on up - interface ppp-client disable l2tp-out1 !