diff options
| author | 2026-07-05 21:53:41 -0600 | |
|---|---|---|
| committer | 2026-07-05 21:53:41 -0600 | |
| commit | 6cc7f8981e806effba20257a183b3741c2380334 (patch) | |
| tree | 95fff8a24d2963645be5556bca5886938b71e2ad | |
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | dns_auth_hook | 8 | ||||
| -rwxr-xr-x | dns_cleanup_hook | 7 | ||||
| -rw-r--r-- | sh.conf.example | 2 |
4 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..194b9d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sh.conf 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 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" diff --git a/sh.conf.example b/sh.conf.example new file mode 100644 index 0000000..6756587 --- /dev/null +++ b/sh.conf.example @@ -0,0 +1,2 @@ +API="https://beta.servfail.network/api/v1/servers/miyuki.sakamoto.pl./zones/example.com." +API_KEY="1234abcd" |
