#12500: Add cloudflare.com to DDNS Scripts
--------------------------+----------------------------------
  Reporter:  easisee@…    |      Owner:  developers
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  Chaos Calmer (trunk)
 Component:  packages     |    Version:  Trunk
Resolution:               |   Keywords:
--------------------------+----------------------------------

Comment (by anonymous):

 Or use cloudflare update script

 #!/bin/sh /etc/rc.common
 # (c) Radio Kuchka 2014

 API=API key <--change this
 EMAIL= email <--change this
 HOSTNAME= domain name <--change this

 if test -f /tmp/ip_cloudflare.txt
 then
 CacheIP=$(cat /tmp/ip_cloudflare.txt)
 fi

 CurrentIP=`/sbin/ifconfig pppoe-wan | grep 'inet addr' | cut -d ':' -f 2 |
 cut -d ' ' -f 1`

 if [ "$CurrentIP" != "$CacheIP" ]
 then
 echo "Updating CloudFlare DNS with" $CurrentIP
 echo `date` "IP" $CurrentIP >> /tmp/log/cloudflare-dns-update.log

 wget --no-check-certificate -O /tmp/cloudflare.domain
 
"https://www.cloudflare.com/api_json.html?a=DIUP&hosts=$HOSTNAME&u=$EMAIL&tkn=$API&ip=$CurrentIP";

 Then add file root to /etc/crontabs

 with

 #!/bin/sh
 */7 * * * * /etc/init.d/custom/cloudflare restart

 then

 /etc/init.d/cron start
 /etc/init.d/cron enable

--
Ticket URL: <https://dev.openwrt.org/ticket/12500#comment:8>
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