Skip to content

Commit

Permalink
Merge pull request yulewang#6 from busymx/master
Browse files Browse the repository at this point in the history
fix issue yulewang#5
  • Loading branch information
yulewang authored Apr 30, 2020
2 parents 480eb9d + 2fac050 commit 9fc2dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cf-v4-ddns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ RESPONSE=$(curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$CFZONE_ID
-H "Content-Type: application/json" \
--data "{\"id\":\"$CFZONE_ID\",\"type\":\"$CFRECORD_TYPE\",\"name\":\"$CFRECORD_NAME\",\"content\":\"$WAN_IP\", \"ttl\":$CFTTL}")

if [ "$RESPONSE" != "${RESPONSE%success*}" ] && [ $(echo $RESPONSE | grep "\"success\":true") != "" ]; then
if [ "$RESPONSE" != "${RESPONSE%success*}" ] && [ "$(echo $RESPONSE | grep "\"success\": true")" != "" ]; then
echo "Updated succesfuly!"
echo $WAN_IP > $WAN_IP_FILE
exit
Expand Down

0 comments on commit 9fc2dd5

Please sign in to comment.