Community discussions

MikroTik App
 
dan_99503
newbie
Topic Author
Posts: 28
Joined: Mon Feb 07, 2005 3:41 am

Can't get scripts to execute in RC6

Sun Jun 26, 2005 8:49 am

I have the latest release candidate and I cannot get scripts to execute at all.

I have tried the simple hello world example from the manual and it won't even execute. The execute couter will not move off of 0.

Have anyone else had this problem?

- Dan
 
dan_99503
newbie
Topic Author
Posts: 28
Joined: Mon Feb 07, 2005 3:41 am

Solved

Sun Jun 26, 2005 10:47 am

I figured out several problems I was running into.

1. When I was cut and pasting scripts from my computer to the winbox terminal they were getting corrupted.

2. I am trying to get the dynamic dns script working for changip. As near as I can tell the information returned by the /ip address get command must have changed.

I had to modify it to remove the subnet bitmask designed on the value it returned.

- Dan
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Sun Jun 26, 2005 7:24 pm

Dan,

I was working on migrating the changeip.com ddns scripts to rc6 - but I realized MT now built support for us directly using /tool dns-update ... It's not 100% clear to me yet how it works, but I have seen successful updates come in. I will be doing the testing for this more this week and will post updates / bugs if I find any. If this gets ironed out then there will be no need for the custom ddns-to-smtp proxy anymore. : )

Thanks,
Sam
 
dan_99503
newbie
Topic Author
Posts: 28
Joined: Mon Feb 07, 2005 3:41 am

DDNS script

Sun Jun 26, 2005 11:04 pm

I have actually modified the script to use the new 2.9 dns-udpate with changeIP. Just getting the script to work is a bear.

It seems like you still have to use a script just to get the dynamic IP address of the other interface, I'm surprised it's not built into the new dns-update command?


Scripting on the MT can be frustrating since it doesn't yeild any error messages or codes, just like coding in the dark. I have to dump output to the log step by step just to see what is working or not working. Is there a better way to script (with error messages instead of silent?).

- Dan
 
dolf
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Mon Mar 28, 2005 9:24 pm

Dynamic DNS

Mon Jul 11, 2005 11:22 pm

I am new to mikrotik but have 3 systems running succesfully.

I want to start using dynamic dns and tried the scripts from Changeip with thier service and got it to work once but not again. In my log I get this message 'script error: invalid item number'

Where is the fault or how can I find it? Is thier any new scripts? I send a support query to Changeip but 24 hours later still no reply!
 
dan_99503
newbie
Topic Author
Posts: 28
Joined: Mon Feb 07, 2005 3:41 am

Wed Jul 13, 2005 11:58 am

This is the hack that I wrote to do Dynamic DNS.

I modified ChangeIPs original script but haven't been able to get it working 2.9. I'm having a problem with the global variable that keeps track of the previous IP address for comarison.

If you set this script to execute every 10 minutes in the scheduler it will update you DDNS. Maybe when error messages appear in 2.9 I can tell what is going wrong with the other script. It only updates when a change is made.


---------------------
:set xip [/ip address get [/ip address find interface=ppp-out1] address];

:set myip [:pick $xip 0 [:find $xip "/"] ];
:log warning "Changing DDNS address to ...";
:log warning $myip;

/tool dns-update name=mysite.ddns.ms address=$myip key-name=sitex key="xxxxxxxx";

------------------------
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Wed Jul 13, 2005 6:27 pm

I am in the process of making 2.9 dynamic dns update scripts using the native /tool dns-update now. I should be done with this later today. I ran into a few stumbling blocks with the new syntax on global variables, etc. Anyhow, I will post a complete set of scripts when I test them later today.

Sam

Who is online

Users browsing this forum: andy76sz, anv, mitzone and 56 guests