I have a problem with a script; it works good via shell but doesn't work on system/script also if I import the code exactly as is.
Code: Select all
{:if ([/routing bgp peer get [find name="CYMRU-1"] state] = "established") do={:global CYMRUSTATE;:delay 1;:set $CYMRUSTATE value="1";} else={:log error message="BGP Peer state not established"; /routing ospf instance set 0 distribute-default=never; :if ($CYMRUSTATE = "1") do={/tool e-mail send from=r1@mydomain.it server=X.X.X.X to=support@mydomain.it subject="BGP Peer down" port=25 body="BGP Peer down";:delay 1;:set $CYMRUSTATE value="0";}}}
WHY ? Any ideas ?