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