- Enable Dynamic DNS for your domain. You'll get a "password" that you can use for their API Endpoint.
- Replace variable values with your own.
- Put the script in a safe place (I just used my home folder)
- Set a cron job (or other recurring service) to run your script.
- ???
- Profit
Last active
April 10, 2017 15:11
-
-
Save yourbuddyconner/96e68e87a08b02efa4d2 to your computer and use it in GitHub Desktop.
NameCheap Dynamic DNS Updater Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
Host_Name=host | |
Domain=example.com | |
Password="PASS_HASH_FROM_NAMECHEAP" | |
IP_Address=$(curl -s icanhazip.com) | |
url="https://dynamicdns.park-your-domain.com/update?host=$Host_Name&domain=$Domain&password=$Password" | |
result=$(curl -s --globoff $url) | |
echo $url | |
echo "" | |
echo "$result" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment