Change this repo to hold the whole ddns code - planning to re-implement in react

This commit is contained in:
Joe Tretter
2023-02-24 13:38:35 -06:00
parent 8513a6345f
commit eed28805dd
3 changed files with 200 additions and 0 deletions

15
updaters/ddnsupd.sh Normal file
View 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
View File

@@ -0,0 +1 @@
http://kawomi.com/ddnsupd.php?domain=xbmcpi