Created
July 7, 2017 20:20
-
-
Save SwamiRama/16cce348892ff4af56cb5ac583c435d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
IP = `curl ipinfo.io/ip`.delete!("\n") | |
puts IP | |
curl_command = "curl -X PUT \"https://api.cloudflare.com/client/v4/zones/ZONEINFO/dns_records/DOMAIN_INFO\" \ | |
-H \"X-Auth-Email: EMAIL\" \ | |
-H \"X-Auth-Key: API_KEY\" \ | |
-H \"Content-Type: application/json\" \ | |
--data '{\"type\":\"A\",\"name\":\"domain\",\"content\":\"#{IP}\",\"proxied\":true}'\"\"" | |
exec curl_command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment