summaryrefslogtreecommitdiff
path: root/dns_auth_hook
diff options
context:
space:
mode:
authorGravatar steering72532026-07-05 21:53:41 -0600
committerGravatar steering72532026-07-05 21:53:41 -0600
commit6cc7f8981e806effba20257a183b3741c2380334 (patch)
tree95fff8a24d2963645be5556bca5886938b71e2ad /dns_auth_hook
init HEAD main
Diffstat (limited to 'dns_auth_hook')
-rwxr-xr-xdns_auth_hook8
1 files changed, 8 insertions, 0 deletions
diff --git a/dns_auth_hook b/dns_auth_hook
new file mode 100755
index 0000000..8e8c58d
--- /dev/null
+++ b/dns_auth_hook
@@ -0,0 +1,8 @@
+#!/bin/bash
+. ./sh.conf
+
+#CERTBOT_IDENTIFIER="${CERTBOT_IDENTIFIER:-cgit.zone.}"
+#CERTBOT_VALIDATION="${CERTBOT_VALIDATION:-test}"
+data='{"rrsets": [{"changetype":"REPLACE","name":"_acme-challenge.'"$CERTBOT_IDENTIFIER"'.","type":"TXT","records":[{"content":"\"'"$CERTBOT_VALIDATION"'\"","disabled":false}],"ttl":60}]}'
+curl -s -X PATCH -d "$data" -H 'Content-Type: application/json' -H 'X-API-Key: '"$API_KEY" "$API"
+sleep 10