Skip to content

Instantly share code, notes, and snippets.

@frytaz
Created May 29, 2017 20:36
Show Gist options
  • Select an option

  • Save frytaz/f0a2d34fbf51fbf731b1f4b2c7051026 to your computer and use it in GitHub Desktop.

Select an option

Save frytaz/f0a2d34fbf51fbf731b1f4b2c7051026 to your computer and use it in GitHub Desktop.
linode_resource_update.sh
#!/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