initial checkin from subversion

This commit is contained in:
Tretter
2017-02-07 20:04:29 +00:00
commit e6c7574fda
2 changed files with 16 additions and 0 deletions

15
ddnsupd.sh Normal file
View File

@@ -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