/netlify-ddns

This is a Bash script to update a Netlify subdomain A record with the current external IP.

Primary LanguageShell

Netlify DDNS

This is a Bash script to update a Netlify subdomain A record with the current external IP.

I also created a Gist for this script for a blog post.


Usage

netlify-ddns.sh <ACCESS_TOKEN> <DOMAIN> <SUBDOMAIN> <TTL> [<CACHED_IP_FILE>]

Example

The example below would update the local.example.com A record to the current external IP with a TTL of 5 minutes. The last parameter for the script is optional and is used to cache the Netlify IP to reduce API calls. netlify-ddns.sh aCcEsStOKeN example.com local 300 /home/johnsmith/cached-ip-file.txt


Prerequisites


Related