mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2024-12-22 18:52:46 +01:00
ydns6: fixes
This commit is contained in:
parent
da67dedf33
commit
904675e310
@ -29,7 +29,7 @@ else
|
||||
WAN_IP6=$(curl -sL6 https://icanhazip.com/)
|
||||
fi
|
||||
if [ -f $HOME/.wan_ip6-ydns.txt ]; then
|
||||
OLD_WAN_IP6=$(cat $HOME/.wan_ip6-ydns.txt)
|
||||
OLD_WAN_IP6=$(cat $HOME/.ydns6.txt)
|
||||
else
|
||||
echo "No file, need IP6"
|
||||
OLD_WAN_IP6=""
|
||||
@ -39,8 +39,8 @@ fi
|
||||
if [ "$WAN_IP6" = "$OLD_WAN_IP6" ]; then
|
||||
echo "IP6 Unchanged"
|
||||
else
|
||||
echo $WAN_IP6 > $HOME/.wan_ip6-ydns.txt
|
||||
echo $WAN_IP6 > $HOME/.ydns6.txt
|
||||
echo "Updating DNS to $WAN_IP6"
|
||||
curl -6 --basic -u "$USEREMAIL:$PASSWORD" --silent \
|
||||
https://ydns.eu/api/v1/update/?host=$HOSTNAME
|
||||
https://ydns.io/api/v1/update/?host=$HOSTNAME\&ip=$WAN_IP6
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user