From e6c7574fda3e63b6443570885ca71583694d26a3 Mon Sep 17 00:00:00 2001 From: Tretter Date: Tue, 7 Feb 2017 20:04:29 +0000 Subject: [PATCH] initial checkin from subversion --- ddnsupd.sh | 15 +++++++++++++++ ddnsurl | 1 + 2 files changed, 16 insertions(+) create mode 100644 ddnsupd.sh create mode 100644 ddnsurl 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