Hi,
I have made a script:
:global "routeCounter" 0
:foreach route in=[/ip route find where dst-address in 10.2.0.0/20 and bgp] do={
:set $routeCounter ($routeCounter+1);
}
if ($routeCounter = 0) do={
:put [/interface vrrp set [find name=vrrp1] priority=50];
}
Pretty basic, I made it in SublimeText with syntax highlighting, after that I pasted it into the system:
/system script set 0 source={<above script>}
But the strange thing is…while pasting that into the CLI, apparently it executed the part:
/interface vrrp set [find name=vrrp1] priority=50
This causes the active VRRP connection to be put in backup. Since this was a test-setup, it doesn’t matter, but I don’t want that every time I paste commands for a script in the CLI that it gets executed right away.
I am probably doing something wrong?
Regards,
Chris