A quick and dirty shell script to view and manipulate cloudflare zone records.
Designed to be used on *NIX systems with minimal support software installed (No perl, python, php etc).
Primary goal is to implement a light-weight DYNDNS client with the ability to debug host/zone records.
./cloudflareZoneRecord.sh GETZONE
returns: JSON object of entire zone (all records)
./cloudflareZoneRecord.sh GETRECORD A www.mydomain.com
returns: JSON object of record within the defined zone
./cloudflareZoneRecord.sh SETRECORD 545832696a294e8d912334af31248 A www.mydomain.com 127.0.0.1
returns: SUCCESS|FAILED
./cloudflareZoneRecord.sh ADDRECORD A www.mydomain.com 127.0.0.1
returns: SUCCESS|FAILED
./cloudflareZoneRecord.sh DELRECORD 545832696a294e8d912334af31248
returns: SUCCESS|FAILED
./cloudflareZoneRecord.sh DYNDNSUPDATE
returns:
- NO UPDATE NECESSARY |
- [UPDATE NECESSARY, PREVIOUS_IP -> CURRENT_IP]
- EMAIL
- email address associated with CloudFlare account
- ZONEID
- primary zone id for the domain
- GLOBAL_API_KEY
- cloudflare api key
- DYNDNSRECORDID
- record id for dynDns update
- DYNDNSRECORDNAME
- record name for dynDns update
- DYNDNSRECORDTYPE
- record type for dynDns update