Created
January 11, 2019 14:10
-
-
Save adrianmihalko/ff01b7b3c0321d0fcb1cfa9935ea6ff2 to your computer and use it in GitHub Desktop.
Custom DDNS on Ubiquiti USG for specific interface
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
/etc/cron.hourly/ddns: | |
#!/bin/bash | |
YDNS_USER= | |
YDNS_PASSWD= | |
HOST=.ydns.eu | |
INTERFACE=pppoe0 | |
IP=$(ip address show ${INTERFACE} | grep 'inet ' | awk '{print $2}') | |
curl --basic -u "$YDNS_USER:$YDNS_PASSWD" --silent "https://ydns.io/api/v1/update/?host=${HOST}&ip=${IP}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment