Change this repo to hold the whole ddns code - planning to re-implement in react
This commit is contained in:
15
updaters/ddnsupd.sh
Normal file
15
updaters/ddnsupd.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
(oldip=0
|
||||
|
||||
while /bin/true
|
||||
do ip=$(ifconfig wlp2s0 | grep 'inet ' | awk '{ 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 ) &
|
||||
|
||||
1
updaters/ddnsurl
Normal file
1
updaters/ddnsurl
Normal file
@@ -0,0 +1 @@
|
||||
http://kawomi.com/ddnsupd.php?domain=xbmcpi
|
||||
Reference in New Issue
Block a user