mike6715b / Mikrotik_CF_DDNS

Script for automatic DNS updates on Cloudflare
64 stars 24 forks source link

some bug and advice #2

Closed sunnychuchu closed 3 years ago

sunnychuchu commented 3 years ago
  1. need move upper for $CFurl is requried define for 1st run ################# Build CF API Url (v4) ################# :local CFurl "https://api.cloudflare.com/client/v4/zones/" :set CFurl ($CFurl . "$CFzoneid/dns_records/$CFid");

  2. for command line debug mode

    :log info ("CF: Command = \"/tool fetch http-method=put mode=https url=\"$CFurl\" http-header-field="Authorization:Bearer $CFtkn,content-type:application/json" output=none http-data=\"{\"type\":\"$CFrecordType\",\"name\":\"$CFdomain\",\"ttl\":$CFrecordTTL,\"content\":\"$WANip\"}\"")

recommend rewrite for testing in command :log info ("CF: Command = \"/tool fetch http-method=put mode=https url=\"$CFurl\" http-header-field=\"Authorization:Bearer $CFtkn,content-type:application/json\" output=none http-data=\"{\\"type\\":\\"$CFrecordType\\",\\"name\\":\\"$CFdomain\\",\\"ttl\\":$CFrecordTTL,\\"content\\":\\"$WANip\\"}\"") };

mike6715b commented 3 years ago

Hy, sorry for the late response i was busy with work a lot. Thank you kindly for your input. I greatly appreciate it :)

Would you like to add a pull request to my repo or should I make the changes?