Skip to content

Commit

Permalink
Update Ali-DNSpod-CF-ddns.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kwxos authored Feb 8, 2024
1 parent ae41bb1 commit 5d86c33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Ali-DNSpod-CF-ddns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,10 @@ if [ "$numip" = "1" ] ; then
exit 0
else
IPnew=$(sed -n "$((x + 2)),1p" "$DCF_file" | awk -F, '{print $1}')
if ping -c 4 -W 2 "$IPnew" &> /dev/null; then
echo -e "$(date): IP $IPnew 可正常使用...." >> ddns_log.txt
else
echo -e "$(date): IP $IPnew 不可用,将执行IP更新..." >> ddns_log.txt
if nc -zv -w 2 "$IPnew" "$CF_POST" &> /dev/null; then
echo -e "$(date): IP $IPnew 可正常使用...." >> ddns_log.txt
else
echo -e "$(date): IP $IPnew 不可用,将执行IP更新..." >> ddns_log.txt
{
rm -rf ip.txt ipv6.txt informlog
run
Expand Down

0 comments on commit 5d86c33

Please sign in to comment.