I am currently trying to make simple script for load balancing on a few of my MKTs and the key point of the whole script is getting the address a pptp-client connects to. If I am not mistaken, the command should be : [/interface pptp-client get $vpninterface connect-to]
The problem is, it simply does not get any address and doesn’t return any value. I have about two dozen routers on different firmware and not one of them seems to work with that command.
Here is a part of my script :
:local stara “31.45.237.250”
:local nova “31.45.237.254”
:local “trenutna” [/interface pptp-client get $“pptp-racunala” connect-to]
:if ( [/interface pptp-client get $int running] != true ) do={
:if ($“trenutna” = $“nova”) do={ /interface pptp-client set pptp-racunala connect-to=$“stara”}
}}
The bold part is giving me a hard time, so I would really appreciate any information on my mistake or if you can provide me with any insight on a workaround.