commit e6c7574fda3e63b6443570885ca71583694d26a3 Author: Tretter Date: Tue Feb 7 20:04:29 2017 +0000 initial checkin from subversion diff --git a/ddnsupd.sh b/ddnsupd.sh new file mode 100644 index 0000000..156250c --- /dev/null +++ b/ddnsupd.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +oldip=0 + +while /bin/true +do ip=$(ifconfig eth0 | grep 'inet addr:' | awk -F '[:]' '{ print $2 }' | awk '{ print $1}') +if [ $oldip != $ip ] +then url=$(head -n 1 /etc/ddnsurl) +curl -k "${url}&address=$ip" +echo updated $oldip to $ip +oldip=$ip +fi +sleep 60 +done + diff --git a/ddnsurl b/ddnsurl new file mode 100644 index 0000000..f58bf9b --- /dev/null +++ b/ddnsurl @@ -0,0 +1 @@ +http://kawomi.com/ddnsupd.php?domain=xbmcpi