Closed linnuxx closed 6 months ago
ZONE='' RECORD='' EMAIL='' AUTH='' DOMAIN=''
IP4P=${3}
while true; do curl -X PUT "https://api.cloudflare.com/client/v4/zones/${ZONE}/dns_records/${RECORD}" \ -H "X-Auth-Email: ${EMAIL}" \ -H "Authorization: Bearer ${AUTH}" \ -H "Content-Type:application/json" \ --data "{\"type\":\"AAAA\",\"name\":\"${DOMAIN}\",\"content\":\"${IP4P}\",\"ttl\":60,\"proxied\":false}" > /dev/null 2> /dev/null if [ $? -eq 0 ]; then break fi done
where to get these variables: ZONE=" RECORD=" EMAIL=" AUTH=" DOMAIN="
refer to https://developers.cloudflare.com/api/
!/bin/sh
ZONE='' RECORD='' EMAIL='' AUTH='' DOMAIN=''
IP4P=${3}
while true; do curl -X PUT "https://api.cloudflare.com/client/v4/zones/${ZONE}/dns_records/${RECORD}" \ -H "X-Auth-Email: ${EMAIL}" \ -H "Authorization: Bearer ${AUTH}" \ -H "Content-Type:application/json" \ --data "{\"type\":\"AAAA\",\"name\":\"${DOMAIN}\",\"content\":\"${IP4P}\",\"ttl\":60,\"proxied\":false}" > /dev/null 2> /dev/null if [ $? -eq 0 ]; then break fi done
where to get these variables: ZONE=" RECORD=" EMAIL=" AUTH=" DOMAIN="