DNS Made Easy - Dynamic DNS updater.
This simple script updates your DNSMadeEasy account with your current IP address.
- Check the current outward facing IP address by calling ipify.org (this can be changed in settings)
- If the IP has changed...
- Update each domain A record with the new IP
- If we are in
--daemon
mode, goto 1.
Use NPM to download the script:
sudo npm install -g dmedyn
Create a ~/.dmedyn.json
file containing your site configuration such as the below example:
{
"username": "yourUsername",
"password": "yourPassword",
"domains": {
"domain1.com": 11111111,
"subdomain.somewhere.com": 22222222
}
}
The username is your DME username. The password is created when using the "Dynamic DNS" option of your DNS record in the DME admin screen. You'll also find a "Dynamic DNS ID" in the DME admin screen which will need to be used in place of the 11111111, 22222222, etc values.
Run dmedyn
to update your IP just once:
dmedyn
To use dmedyn
within a process container like forever, run dmedyn in --daemon
mode:
forever start `which dmedyn` -vd
The which dmedync
bit is because forever needs to know the path of the actual JS file to monitor it.
To use dmedyn
within a process container like pm2, run dmedyn in --daemon
mode:
pm2 start `which dmedyn` --name dmedyn -- -vd
The which dmedync
bit is because PM2 needs to know the path of the actual JS file to monitor it.