skylerwlewis / netlify-ddns

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


About

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


Languages

Language:Shell 100.0%