From 8b5fd9ea4be6eeddbc2e89df796e3e9b0174ce43 Mon Sep 17 00:00:00 2001 From: yulewang Date: Wed, 10 Oct 2018 13:15:48 +0800 Subject: [PATCH] Update cf-v4-ddns.sh Bug fixed --- cf-v4-ddns.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cf-v4-ddns.sh b/cf-v4-ddns.sh index b8b8e27..b88a022 100644 --- a/cf-v4-ddns.sh +++ b/cf-v4-ddns.sh @@ -120,7 +120,7 @@ RESPONSE=$(curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$CFZONE_ID -H "X-Auth-Email: $CFUSER" \ -H "X-Auth-Key: $CFKEY" \ -H "Content-Type: application/json" \ - --data "{\"id\":\"$CFZONE_ID\",\"type\":\"A\",\"name\":\"$CFRECORD_NAME\",\"content\":\"$WAN_IP\", \"ttl\":\"$CFTTL\"}") + --data "{\"id\":\"$CFZONE_ID\",\"type\":\"A\",\"name\":\"$CFRECORD_NAME\",\"content\":\"$WAN_IP\", \"ttl\":$CFTTL}") if [ "$RESPONSE" != "${RESPONSE%success*}" ] && [ $(echo $RESPONSE | grep "\"success\":true") != "" ]; then echo "Updated succesfuly!" @@ -130,4 +130,4 @@ else echo 'Something went wrong :(' echo "Response: $RESPONSE" exit 1 -fi \ No newline at end of file +fi