Created
September 28, 2017 05:11
-
-
Save jyungtong/7a01fdcec07c3e4c16679b4c82013150 to your computer and use it in GitHub Desktop.
Update Cloudflare IP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -XPUT \ | |
-H'X-AUTH-EMAIL: [email protected]' \ | |
-H'X-AUTH-KEY: YOUR_VERY_SECRET_AUTH_KEY' \ | |
-H'content-type: application/json' \ | |
"https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/dns_records/{DNS_RECORD}" \ | |
--data '{"type":"A", "name":"YOUR.DOMAIN.COM", "content": "'"$(curl ipinfo.io/ip)"'", "ttl": 120, "proxied": false}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment