Skip to content

Instantly share code, notes, and snippets.

@GillesC
Created September 20, 2019 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GillesC/ff1eb9a95406d6db3c7dbfc1cc1d8602 to your computer and use it in GitHub Desktop.
Save GillesC/ff1eb9a95406d6db3c7dbfc1cc1d8602 to your computer and use it in GitHub Desktop.
#!/bin/bash
ip4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
echo "Enter domainname: "
read domain
echo "Enter domaintoken: "
read token
curl "https://www.duckdns.org/update?domains=${domain}&token=${token}&ip=${ip4}" > /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment