modified: n.fq
[GalaxyCodeBases.git] / etc / Server / ddns.cron
blob0ba3b509b248d65a452d23ca313538f48dd3079f
1 #!/bin/sh
3 # copy to /etc/cron.hourly and chmod +x
5 IP=`wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'`
6 wget --http-user=xxxxxx --http-password='xxxxxx' "http://www.pubyun.com/dyndns/update?system=dyndns&hostname=xxxxxx.3322.org&wildcard=ON&myip=${IP}" -O /var/log/3322DNS -o /var/log/3322DNS.log
8 cat /var/log/3322DNS >> /var/log/3322DNS.log
9 rm -f /var/log/3322DNS
10 echo >> dns.log
11 #date >> /var/log/3322DNS.log
12 uptime >> /var/log/3322DNS.log
14 # http://www.go2linux.org/what-is-my-public-ip-address-with-linux
15 # curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
17 # http://www.linuxquestions.org/questions/linux-networking-3/how-can-i-get-my-external-ip-address-from-behind-a-nat-333878/
18 # wget -O - -q icanhazip.com