diff --git a/dns_scripts/dns_add_cloudflare b/dns_scripts/dns_add_cloudflare new file mode 100755 index 0000000..cb878eb --- /dev/null +++ b/dns_scripts/dns_add_cloudflare @@ -0,0 +1,26 @@ +#!/bin/bash + +# need to add your email address and key to cloudflare below +email="" +key="" + +fulldomain="$1" +token="$2" + +NumParts=$(echo "$fulldomain" | awk -F"." '{print NF}') +if [[ $NumParts -gt 2 ]]; then + domain=$(echo "$fulldomain" | awk -F\. '{print $(NF-1) FS $NF}') + txtname="_acme-challenge$(echo $fulldomain | awk -F\. '{for (i=1; i "${updatefile}" + +nsupdate -k "${dnskeyfile}" -v "${updatefile}" + +rm -f ${updatefile} diff --git a/dns_scripts/dns_del_cloudflare b/dns_scripts/dns_del_cloudflare new file mode 100755 index 0000000..c92cf67 --- /dev/null +++ b/dns_scripts/dns_del_cloudflare @@ -0,0 +1,35 @@ +#!/bin/bash + +# need to add your email address and key to cloudflare below +email="" +key="" + +fulldomain="$1" + +NumParts=$(echo "$fulldomain" | awk -F"." '{print NF}') +if [[ $NumParts -gt 2 ]]; then + domain=$(echo "$fulldomain" | awk -F\. '{print $(NF-1) FS $NF}') + txtname="_acme-challenge$(echo $fulldomain | awk -F\. '{for (i=1; i "${updatefile}" + +nsupdate -k "${dnskeyfile}" -v "${updatefile}" + +rm -f ${updatefile}