First script

Hello,

I have a new RB in my home, I want to configure this script: https://www.letitux.com/routeur-os-mikrotik/2012/09/30/script-de-mise-a-jour-du-dynhost-dovh-router-os.html

I change “Configuration” section and upload to System - Scripts and put some Policies

I “Run Script” it but it doesn’t update de DNS.

Here are my questions:

  1. Which Policy could I put on it?
  2. How could I get the script output? Just to see if everything is OK.

This is my first time with scripts in Mikrotik.

I really appreciate your help.

Kind regards.

Add some more debugging output to the script - note the lines in the existing script like this:
:log info (“DnyDNS-OVH: OK (!! New IP !! => “.$CurrentPublicIP.”)”);

You could insert a line at the very beginning:
:log info (“DynDNS Update script running…”)

and place a few of these throughout the script, and then check your log to see if these outputs are appearing in the log.
If not, then chances are good that there is a typo or syntax error in the script.
Try uploading the script to the router as an .rsc file and then running it from the command-line:
:import foo.rsc

the :import function will give the line number where any syntax error is found. It’s annoying that you don’t get this output when running scripts from the scripts menu. (maybe there’s a logging target which will show it - I haven’t found one but I’m sure the script gurus here can point it out if it’s there)