summaryrefslogtreecommitdiff
path: root/dns_cleanup_hook
diff options
context:
space:
mode:
Diffstat (limited to 'dns_cleanup_hook')
-rwxr-xr-xdns_cleanup_hook7
1 files changed, 7 insertions, 0 deletions
diff --git a/dns_cleanup_hook b/dns_cleanup_hook
new file mode 100755
index 0000000..5f3b58d
--- /dev/null
+++ b/dns_cleanup_hook
@@ -0,0 +1,7 @@
+#!/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":[],"ttl":60}]}'
+curl -s -X PATCH -d "$data" -H 'Content-Type: application/json' -H 'X-API-Key: '"$API_KEY" "$API"