Created
May 9, 2019 20:27
-
-
Save alexey-bass/6df4dc237eeddff9115ef6bdf49638cf to your computer and use it in GitHub Desktop.
noip.com ddns start custom script
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/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