Skip to content

Instantly share code, notes, and snippets.

@gsanders5
gsanders5 / ddns.sh
Created May 22, 2016 01:20 — forked from lyoshenka/ddns.sh
Quick and dirty DDNS using Bash and Cloudflare
#!/usr/bin/env bash
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your token is here: https://www.cloudflare.com/my-account
# Step 2: Create an A record on Cloudflare with the subdomain you chose
# Step 3: Run "./ddns.sh -l" to get the rec_id of the record you created.
# Fill in REC_ID below
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating.
# Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output
# 0 * * * * /path/to/ddns.sh -s