SolidScribe/updatedomain.sh

20 lines
669 B
Bash
Raw Normal View History

#!/bin/sh
# Send updated dynamic IP address to Namecheap, in order to update subdomains.
# This uses curl (separate pkg) to send the change; Namecheap automatically detects source IP if the ip field (like domain, password) ..
# is not specified.
# info helper
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
info "Starting IP update for subdomains"
PASSWORD="12a35d53c2c54d6281265e3e086e541b"
HOST="maxg.cc"
SUBDOMAIN="x.maxg.cc"
#echo "https://dynamicdns.park-your-domain.com/update?host=$SUBDOMAIN&domain=$HOST&password=$PASSWORD"
curl "https://dynamicdns.park-your-domain.com/update?host=$SUBDOMAIN&domain=$HOST&password=$PASSWORD"
info "IP update done"