Skip to content

Commit

Permalink
Fixed issue #6
Browse files Browse the repository at this point in the history
fixed Issue#6
  • Loading branch information
navilg authored Oct 16, 2020
2 parents 5e28ed2 + 36af31a commit 167aaec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion godaddy-ddns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function getPubIP()
ret=$(curl -s GET "http://ipinfo.io/json")
checkret=$?
if [[ $checkret -eq 0 ]]; then
currentIp=$(echo $ret | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b")
currentIp=$(echo "$ret" | grep -w -m 1 "\"ip\"" | sed -r -e 's/^ *//' -e 's/.*: *"//' -e 's/",?//')
return 0
fi
return 1
Expand Down

0 comments on commit 167aaec

Please sign in to comment.