Created
March 29, 2018 14:11
-
-
Save MichaelRyom/a558b71a83a5a7428c1b577ef9c8c52e to your computer and use it in GitHub Desktop.
This file contains 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 | |
#Source https://michaelryom.dk/custom-ddns-on-ubiquiti-usg/ | |
cat << 'EOF' > /etc/cron.hourly/ddns | |
#!/bin/bash | |
IP=$(curl -s -L "http://ipv4.myip.dk/api/info/IPv4Address" | sed -e 's/^"//' -e 's/"$//') | |
curl -s -L "https://api.unoeuro.com/ddns.php?apikey=<API key>&domain=<Domain>&hostname=<Sub domain>&myip=$IP" | logger | |
EOF | |
chmod +x /etc/cron.hourly/ddns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THIS IS AWESOME! <3