#16363: DDns Client nslookup does not work correctly
-----------------------------------+----------------------------------
  Reporter:  openwrt-bugtracker@…  |      Owner:  developers
      Type:  defect                |     Status:  new
  Priority:  normal                |  Milestone:  Chaos Calmer (trunk)
 Component:  packages              |    Version:  Trunk
Resolution:                        |   Keywords:
-----------------------------------+----------------------------------

Comment (by mattbunce):

 I gave up on regex in the end and used "resolveip" instead (You'll need to
 do a "opkg install resolveip" to install this first!).

 I made the following patch to tweak the DDNS script:

 {{{
 119c119
 <         retrieve_prog="/usr/bin/curl "
 ---
 >         retrieve_prog="/usr/bin/curl -k "
 284c284
 <     registered_ip=$(echo $(nslookup "$domain" 2>/dev/null) |  grep -o
 "Name:.*" | grep -o "$ip_regex")
 ---
 >     registered_ip=$(echo $(resolveip "$domain" 2>/dev/null))
 299a300
 >         logger -t dynamic_dns_updater.sh "$service_id update necessary:
 current IP = $current_ip, registered IP = $registered_ip"
 330a332
 >         logger -t dynamic_dns_updater.sh "$service_id update output:
 $update_output"
 347a348
 >        logger "$service_id no update required since last update =
 $human_time_since_update hours ago."
 }}}

 The above script...
 * Forces curl not to check SSL certificates for https posts
 * Uses resolveip instead of nslookup
 * Adds additional logging to keep me sane!

--
Ticket URL: <https://dev.openwrt.org/ticket/16363#comment:19>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to