#!/bin/bash
if [! -f /root/];then
echo $(date +%Y"."%m"."%d" "%k":"%M":"%S) > /root/
curl http://members./dyndns/getip >> /root/
fi
while var=$(curl http://members./dyndns/getip) || true; do
iptxt=$(tail -1 /root/)
#echo $iptxt
#echo $var
if [ $var != $iptxt ];then
echo $(date +%Y"."%m"."%d" "%k":"%M":"%S) >> /root/
echo "$var" >> /root/
#echo "record ip"
#else
#echo "ip is same"
fi
sleep 60s
done