Skip to content

Instantly share code, notes, and snippets.

@bakyeono
Created March 24, 2014 08:54
Show Gist options
  • Save bakyeono/9736637 to your computer and use it in GitHub Desktop.
Save bakyeono/9736637 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Config
UPDATER="/usr/local/gandi-dyndns/gandi-dyndns"
LOG="/var/log/update-ddns.log"
API="Your-Gandi-API"
DOMAIN="your-domain.net"
RECORD="www"
# Run
TIME_STAMP=$(date +"%F %H:%M:%S")
RESULT=$($UPDATER --api=$API --domain=$DOMAIN --record=$RECORD --ipv4 2>&1)
# Log
echo [$TIME_STAMP $RECORD.$DOMAIN] $RESULT >> $LOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment