Tente isto:
#!/bin/bash
for (( ; ; ))
do
IP="$(
curl -s http://whatismijnip.nl |cut -d " " -f 5
)"
#
JSONSTRING='{"id":"dfa4ae7f9d7b99745a6a09e40c12b7f5","type":"A","name":"ts.javelcraft.com","content":"'$IP'","proxiable":true,"proxied":false,"ttl":1,"locked":false,"zone_id":"fc4a89d0f0a71df7969d3f6d32ef5c61","zone_name":"javelcraft.com","created_on":"0000-00-00T00:00:00.000000Z","modified_on":"0000-00-00T00:00:00.000000Z","data":{}}'
#
curl -X PUT "https://api.cloudflare.com/client/v4/zones/fc4a89d0f0a71df7969d3f6d32ef5c61/dns_records/dfa4ae7f9d7b99745a6a09e40c12b7f5"
-H "Content-Type:application/json"
-H "X-Auth-Key: U Dont Have To Know This"
-H "X-Auth-Email:[email protected]"
-d $JSONSTRING
# PRINT PRETTY JSON FORMAT
echo $JSONSTRING | python -mjson.tool
done
pause