Checking existing object

Hello.
There is a script for adding a route for some ip:

:local "current-ip" "55.55.55.55"
/ip route add distance=1 dst-address=$"current-ip" gateway=192.168.77.1 scope=30 target-scope=10 disabled=no comment="ROUTE TO 55.55.55.55"

If I run the script twice, in routing table appear same route lighted blue.
How to check before route adding if it exist, and do not add if it exist
Write instruction please. :slight_smile:

This script searches all routes for the IP in the comment. If none are found, the route is added.
:local “current-ip” “55.55.55.55”
:if ([:len [/ip route find comment~$“current-ip”]] = 0) do={
/ip route add distance=1 dst-address=$“current-ip” gateway=192.168.77.1 scope=30 target-scope=10 disabled=no comment=“ROUTE TO 55.55.55.55”
}

Thank you.