Files
ddns/ddns.bash
billy harvey 484426a1cd .
2025-01-01 00:06:47 +00:00

17 lines
659 B
Bash
Executable File

#!/bin/bash
DOMN=primal.host
PASS=35f5fa4e1fc04d539260a4afaeb42371 \
IP0=''
while true ; do
IP1=$(curl --no-progress-meter 'https://api.ipify.org?format=text')
if [[ "${IP1}" != "${IP0}" && "${IP1}" != '' ]] ; then
OP0=$(curl --no-progress-meter -X GET -d 'host=@' -d "domain=${DOMN}" -d "password=${PASS}" -d "ip=${IP1}" -G 'https://dynamicdns.park-your-domain.com/update')
OP1=$(curl --no-progress-meter -X GET -d 'host=*' -d "domain=${DOMN}" -d "password=${PASS}" -d "ip=${IP1}" -G 'https://dynamicdns.park-your-domain.com/update')
echo $(date) ${IP0} ${IP1}
IP0=${IP1}
else
echo $(date) ${IP0} ${IP1} .
fi
sleep 3661
done