initial commit of file from CVS for e-smith-dynamicdns-dyndns.org on Wed 12 Jul 08:52:42 BST 2023
This commit is contained in:
0
root/etc/e-smith/events/e-smith-dynamicdns-dyndns.org-update/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/e-smith-dynamicdns-dyndns.org-update/.gitignore
vendored
Normal file
56
root/sbin/e-smith/dynamic-dns/dyndns.org
Normal file
56
root/sbin/e-smith/dynamic-dns/dyndns.org
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
# Description: www.dyndns.org (free service)
|
||||
|
||||
#------------------------------------------------------------
|
||||
# dyndns.org dynamic DNS update handler.
|
||||
#------------------------------------------------------------
|
||||
|
||||
IPADDR=$1
|
||||
USERID=$2
|
||||
PASSWD=$3
|
||||
DOMAIN=$4
|
||||
|
||||
# This request will set wildcards on, such that *.$DOMAIN will resolve to
|
||||
# $DOMAIN. Thus, if your domain is fred.dyndns.org, www.fred.dyndns.org
|
||||
# will resolve as well.
|
||||
|
||||
wget -q -O /tmp/dyndns.log \
|
||||
--user-agent="e-smith-dyndns.org/0.1" \
|
||||
http://"$USERID:$PASSWD"@members.dyndns.org/nic/update?\
|
||||
system=dyndns\&hostname="$DOMAIN"\&myip="$IPADDR"\&wildcard=ON
|
||||
|
||||
RESULT=`cat /tmp/dyndns.log`
|
||||
case "$RESULT" in
|
||||
good*)
|
||||
logger -t dyndns.org "Update at $IPADDR succeeded." ;;
|
||||
nochg*)
|
||||
logger -t dyndns.org "IP Address $IPADDR already in database." ;;
|
||||
notfqdn*)
|
||||
logger -t dyndns.org \
|
||||
"$DOMAIN is not a Fully-Qualified Domain Name." ;;
|
||||
nohost*)
|
||||
logger -t dyndns.org \
|
||||
"$DOMAIN does not exist on the dyndns.org system." ;;
|
||||
!yours*)
|
||||
logger -t dyndns.org "$DOMAIN does not belong to you." ;;
|
||||
badauth*)
|
||||
logger -t dyndns.org "Bad username or password $USERID:$PASSWD." ;;
|
||||
abuse*)
|
||||
logger -t dyndns.org \
|
||||
"$DOMAIN is blocked for abuse; contact support@dyndns.org" \
|
||||
"to unblock." ;;
|
||||
numhost*)
|
||||
logger -t dyndns.org "Too many or too few hosts found." ;;
|
||||
dnserr*)
|
||||
logger -t dyndns.org "DNS Error encountered." \
|
||||
"Response was $RESULT. Please contact support@dyndns.org." ;;
|
||||
w*)
|
||||
logger -t dyndns.org \
|
||||
"NIC is currently unavailable. Response was $RESULT." ;;
|
||||
911*)
|
||||
logger -t dyndns.org "Something is horribly wrong." ;;
|
||||
*)
|
||||
logger -t dyndns.org "Unknown response $RESULT. Status was $?";;
|
||||
esac
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user