ROUTE USES WRONG INTERFACE AFTER RECONNECT

Hi everyone! I currently make use of a VPN to my VPNGW MT for mail purposes. In SA, our DSL times out every 24 hours. When that happens, my ROUTE for forwarding all DST traffic to my VPNGW (so clients can use my SMTP server on a local IP, 198.0.254.254), does not use the VPNGW as it’s Interface, but rather my BANDWIDTH interface. (I hope I make sense here)

What I want to do, is create a script to check on what interface the Gateway is. If the interface is BANDWIDTH, the script should remove the existing route, and create a new one, which will then automatically choose the VPNGW as it’s interface, rather than BANDWIDTH.

What I have done so far is this:

:log message=“Updating VPNGW”

:global VPNGWIP

:set VPNGWIP [/ip route get [/ip route find dst-address=198.0.254.0] interface]

/tool e-mail send to=“giepie@varynet.co.za” from=“test@test.co.za” body=VPNGWIP

:log message=VPNGWIP

What I can’t get working, is to name the variable VPNGWIP to the interface. I added the e-mail command, to see what the value of VPNGWIP is, but it’s value is VPNGW, instead of VPNGWIP or BANDWIDTH (VPNGW is the VAR’s name, and VPNGWIP and BANDWIDTH is the diff interfaces’ names.)

Surely they set and find command should change the value of the VAR to the INTERFACE NAME because I said:
:set VPNGWIP [/ip route get [/ip route find dst-address=198.0.254.0] interface]Please help me, thanks a lot!! Giepie