Skip to content

Instantly share code, notes, and snippets.

@hansdg1
Created November 5, 2016 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hansdg1/417830c15c22f459e5970b51d33cddf6 to your computer and use it in GitHub Desktop.
Save hansdg1/417830c15c22f459e5970b51d33cddf6 to your computer and use it in GitHub Desktop.
Dynamic DNS Update script for EdgeRouter Lite
#!/bin/bash
# Author: Hans Guthrie
# Date: 11/5/2016
# Purpose: Updates dynamic dns (ddns) on eth0.
# This is needed because our current ddns supplier, noip, expires your hostname after 28 days of inactivity.
# Surprisingly there's no better way to accomplish this than to use a cron job.
# Takes advantage of the operational command wrapper that is documented here:
# https://help.ubnt.com/hc/en-us/articles/204976164-EdgeMAX-How-to-run-operational-mode-command-from-scripts-
# Load the operational command environment variables
run=/opt/vyatta/bin/vyatta-op-cmd-wrapper
# Update the ddns on eth0
$run update dns dynamic interface eth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment