Code: Select all
:if ($bound=1) do={ /ip route set [/ip route find where comment="GPON"] gateway=$"gateway-address" disabled=no} else={/tool fetch mode=https url="https://domain.tld/hooks/blablabla" http-method=post http-header-field="Content-Type: application/json" http-data="{\"text\":\"Internet switched to the SAT\"}"}
:if ($bound=1) do={/tool fetch mode=https url="https://domain.tld/hooks/blabla" http-method=post http-header-field="Content-Type: application/json" http-data="{\"text\":\"Internet switched to the GPON\"}"}
But when connections are restored, the default route is updated but the notification wasn't sent.
So I can't figure out is a scrip syntax problem or if I don't understand correctly what exactly bound=1 means.
I will be thankful for your advice.