master
1#!/bin/bash
2
3[[ $# -lt 3 ]] && echo "Usage: $0 USERNAME PASSWORD DNS_ID"
4
5USERNAME=${1}
6PASSWORD=${2}
7DNS_ID=${3}
8
9# find your DNS ID here: https://www.hover.com/api/domains/yourdomain.com/dns/
10
11# (replace "yourdomain.com" with your actual domain, and look for the record
12# you want to change. The ID looks like: dns1234567)
13
14IP=$(curl "http://api.exip.org/?call=ip" -s)
15
16curl "https://www.hover.com/api/dns/${DNS_ID}" \
17 -X PUT \
18 -d "content=${IP}" \
19 -s \
20 -b <(curl "https://www.hover.com/signin" \
21 -X POST \
22 -G \
23 -d "username=${USERNAME}" \
24 -d "password=${PASSWORD}" \
25 -s \
26 -o /dev/null \
27 -c -)
28
29echo
30