Community discussions

MikroTik App
 
rd228
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Mon Nov 16, 2015 12:13 pm

Script Trouble

Wed Apr 25, 2018 11:30 pm

Hi all

I am having trouble with task I am trying to run as a script

I am using this to resolve my DNS name which will then update the Remote IP on my GRE Tunnel.

/interface gre set "gre-tunnel1" remote-address=[:resolve "mydomain.com"

This line works from the terminal perfectly....

However if I paste it into a script and hit "run" nothing happens. Am I doing this wrong?
Screen Shot 2018-04-25 at 21.29.09.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11359
Joined: Mon Dec 04, 2017 9:19 pm

Re: Script Trouble  [SOLVED]

Wed Apr 25, 2018 11:51 pm

I can see a missing right (closing) parenthesis after the
[:resolve mydomain.com]
part. A copy-paste error maybe?
 
rd228
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Mon Nov 16, 2015 12:13 pm

Re: Script Trouble

Thu Apr 26, 2018 12:07 am

Ah my bad! Apologies!

That fixed it...not paying attention.