Browse Source

added comments if you have a large number of domains

pull/143/head
srvrco 9 years ago
parent
commit
14d6723f24
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      dns_scripts/dns_add_cloudflare
  2. +2
    -0
      dns_scripts/dns_del_cloudflare

+ 2
- 0
dns_scripts/dns_add_cloudflare View File

@ -5,6 +5,8 @@ key=""
fulldomain="$1"
token="$2"
# get a list of all domain names from cloudflare. If you have a lot, you may need
# "status=active&page=1&per_page=1000&match=all" instead of just "match=all"
all_domains=$(curl --silent -X GET "https://api.cloudflare.com/client/v4/zones?match=all" \
-H "X-Auth-Email: ${email}" -H "X-Auth-Key: ${key}" -H "Content-Type: application/json" \
| grep -o "\"name\":\"[^\"]*\"" | awk -F'"' '{print $4}')


+ 2
- 0
dns_scripts/dns_del_cloudflare View File

@ -6,6 +6,8 @@ key=""
fulldomain="$1"
# get a list of all domain names from cloudflare. If you have a lot, you may need
# "status=active&page=1&per_page=1000&match=all" instead of just "match=all"
all_domains=$(curl --silent -X GET "https://api.cloudflare.com/client/v4/zones?match=all" \
-H "X-Auth-Email: ${email}" -H "X-Auth-Key: ${key}" -H "Content-Type: application/json" \
| grep -o "\"name\":\"[^\"]*\"" | awk -F'"' '{print $4}')


Loading…
Cancel
Save