Created
May 29, 2017 20:36
-
-
Save frytaz/f0a2d34fbf51fbf731b1f4b2c7051026 to your computer and use it in GitHub Desktop.
linode_resource_update.sh
This file contains hidden or 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 | |
| # API Key can be found on https://manager.linode.com/profile/index | |
| APIKEY='' | |
| # IP address You want to set domain to | |
| TARGETIP=`dig +short myip.opendns.com @resolver1.opendns.com | tr -d "\r\n"` | |
| # Domain id | |
| DOMAINID='897947' | |
| # Domain resource id | |
| RESOURCEID='7953514' | |
| wget --no-check-certificate -o /dev/null -O /dev/null "https://api.linode.com/?api_key=$APIKEY&api_action=domain.resource.update&domainid=$DOMAINID&resourceid=$RESOURCEID&target=$TARGETIP" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment