Coder Social home page Coder Social logo

barkmadley / namecheap-ddns-update Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bci/namecheap-ddns-update

0.0 2.0 0.0 6 KB

Bash script to update the your namecheap.com ddns host. Tested under Macintosh OSX 10.9.4 and RHES 7.0

Shell 100.00%

namecheap-ddns-update's Introduction

Namecheap-DDNS-Update

Bash script to update the your namecheap.com ddns host. Tested under Macintosh OSX 10.9.4 and RHES 7.0

Getting Started:

  1. Create a A record on namecheap.com for the host you will be updating. Hint: you can update more then one host, i.e.: @ and www. You may also wish to keep a low TTL value for these hosts, i.e: 60-120
  2. Enable DDNS by Modifing your domain and clicking on the Dynamic DNS entry on the left hand menu. Write down the Password string that is assigned to this domain.
  3. Edit the section of the script:
# >>>>>>>>>>>>>>>>>>>>>> Start of Configuration >>>>>>>>>>>>>>>>>>>>>>
#
DOMAIN='mydomain.tld'
PASSWORD=''
HOSTS=('myhost1' 'myhost2')
EMAIL=''
CACHED_IP_FILE='/var/tmp/namecheap_ddns_ip_'
#
# <<<<<<<<<<<<<<<<<<<<<< End of Configuration <<<<<<<<<<<<<<<<<<<<<<

Configuration:

  • DOMAIN string - name of domain to update
  • PASSWORD string - the password given from Namecheap.com
  • HOSTS array of strings - the array of hosts to update
  • EMAIL string - if exists, then an email will be generated on error or change of IP address
  • CACHED_IP_FILE string - path to file holding the last set IP address

Example Configuration (one host):

DOMAIN='kentswidget.com'
PASSWORD='2138530d9dea58fa'
HOSTS=( devserver )
EMAIL='[email protected]'
CACHED_IP_FILE='/var/tmp/namecheap_ddns_ip_'

Example Configuration (three hosts):

DOMAIN='kentswidget.com'
PASSWORD='2138530d9dea58fa'
HOSTS=('@' 'www' 'devserver')
EMAIL='[email protected]'
CACHED_IP_FILE='/var/tmp/namecheap_ddns_ip_'

Usage:

For these examples I will be saving this script in ~/kent/scripts/NamecheapDdnsUpdate.sh

  • Command line (runs one time)

    1. Open Terminal
    2. Enter the command $bash ~/kent/scripts/NamecheapDdnsUpdate.sh
  • Finder (runs one time)

    1. Open finder and locate NamecheapDdnsUpdate.sh
    2. Double-click on file
  • Cron (runs every hour)

    1. Open Terminal
    2. Enter the command $crontab -e
    3. Add a line: @hourly ~/kent/scripts/NamecheapDdnsUpdate.sh

Ignore the script - one liner

Fill in the domain, password, and host for your account

  • curl line
    • $curl -s https://dynamicdns.park-your-domain.com/update?domain=my.domain.com&password=33598fgc98a1dbcd&host=myhost

namecheap-ddns-update's People

Contributors

bci avatar reduxionist avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.