Skip to content

Instantly share code, notes, and snippets.

@alexey-bass
Created May 9, 2019 20:27
Show Gist options
  • Save alexey-bass/6df4dc237eeddff9115ef6bdf49638cf to your computer and use it in GitHub Desktop.
Save alexey-bass/6df4dc237eeddff9115ef6bdf49638cf to your computer and use it in GitHub Desktop.
noip.com ddns start custom script
#!/bin/sh
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS
# https://github.com/RMerl/asuswrt-merlin/wiki/DDNS-Sample-Scripts
# https://www.noip.com/integrate/request
USERNAME="alexey-bass"
PASSWORD="**********"
HOSTNAME="*****.ddns.net"
IP="$(curl -fs4 https://myip.dnsomatic.com/)"
USER_AGENT="ASUS WRT Merlin"
curl -fs -A "${USER_AGENT}" -o /dev/null "http://${USERNAME}:${PASSWORD}@dynupdate.no-ip.com/nic/update?hostname=${HOSTNAME}&myip=${IP}"
if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment