Hi All!
REQUEST
Can you help me change the DNS O Matic custom script below so it fetches a global ip address?
SETUP
asus router > usb android phone > internet
BACKGROUND
I read the help doc but don't know how to apply it because I can't find IP=${1} in the script. I can see a similar "myip=" however,
"Find the line in your update script where the IP is used
IP=${1}
and change it to get the IP from an external source
IP=$(wget -O - -q http://myip.dnsomatic.com/)"
CUSTOM SCRIPT
#!/bin/sh
# Update the following variables:
USERNAME=dnsomatic_username
PASSWORD=dnsomatic_password
HOSTNAME=all.dnsomatic.com
# Should be no need to modify anything beyond this point
/usr/sbin/curl -k --silent -u "$USERNAME:$PASSWORD" "https://updates.dnsomatic.com/nic/update?hostname=$HOSTNAME&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG&myip=" > /dev/null
if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi
REQUEST
Can you help me change the DNS O Matic custom script below so it fetches a global ip address?
SETUP
asus router > usb android phone > internet
BACKGROUND
I read the help doc but don't know how to apply it because I can't find IP=${1} in the script. I can see a similar "myip=" however,
"Find the line in your update script where the IP is used
IP=${1}
and change it to get the IP from an external source
IP=$(wget -O - -q http://myip.dnsomatic.com/)"
CUSTOM SCRIPT
#!/bin/sh
# Update the following variables:
USERNAME=dnsomatic_username
PASSWORD=dnsomatic_password
HOSTNAME=all.dnsomatic.com
# Should be no need to modify anything beyond this point
/usr/sbin/curl -k --silent -u "$USERNAME:$PASSWORD" "https://updates.dnsomatic.com/nic/update?hostname=$HOSTNAME&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG&myip=" > /dev/null
if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi