Hi
Has anyone got a script working that updates the dynamic ip for dnsomatic or opendns ?
Thanks
Shaun
Hi
Has anyone got a script working that updates the dynamic ip for dnsomatic or opendns ?
Thanks
Shaun
I do not think the required URL can be called from a MT box (“?” causes problems). You can use a server behind the box to do the call and use cron in it to schedule the script. Best I can offer.
I’m not sure how dnsomatic or opendns works, but you can try /tool fetch
just like in this example:
http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_EveryDNS
Hi mrz,
That is what I tried. “/tool fetch” does not like the required “?”.
Update: Fails only when run in a shell using the ? in the command line.
ADD: So goes the need for any of the tftp stuff. I will pull all my updates, scripts with fetch from my main server.
ADD2: If the fetch command is unable to contact the dns host, the script will abort. That is the last command the script will execute. Keep that in mind if you decide to alter the program any. I was wrong about the script aborting. To be technically correct, the script interpreter crashes. Aborts all running scripts.
I am kinda sneaky. I have used forks and pipes in Linux C programming, so I know how and where to cheat. I started a failtest script a second before the fetch call script, then tried to access global variables after a few seconds delay to check if the original fetch call script completed or not. If the main script fails, the failtest script does also.
to cheat on the fetch command, save your url request string as a variable, then fetch $url
Seems to work fine for me.
It works great when it works. If the file does not exist, or the server does not respond, then the script interpreter will crash. It restarts on it own, after aborting all running scripts, whether related to the failure script or not…
EDIT: I currently have a request in for tftp and wget. I always mention that it should be “script capable”. That means it returns to the script, whether it works or not. This routine is not “script capable”.