fix script to properly escape strings [ci skip]

This commit is contained in:
Viktor Barzin 2025-02-15 14:31:39 +00:00
parent 9770faba02
commit 73a674ed2b
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863

View file

@ -25,14 +25,15 @@ cat << EOF > $certbot_auth
curl https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records \ curl https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_TOKEN" \ -H "Authorization: Bearer $CLOUDFLARE_TOKEN" \
-d '{ -d "{
"comment": "Domain verification record", \"comment\": \"Domain verification record\",
"content": "$CERTBOT_VALIDATION", \"content\": \"$CERTBOT_VALIDATION\",
"name": "_acme-challenge.$CERTBOT_DOMAIN", \"name\": \"_acme-challenge.$CERTBOT_DOMAIN\",
"proxied": false, \"proxied\": false,
"ttl": 60, \"ttl\": 60,
"type": "TXT" \"type\": \"TXT\"
}' }"
# Sleep to make sure the change has time to propagate from primary to secondary name servers # Sleep to make sure the change has time to propagate from primary to secondary name servers
sleep 25 sleep 25