Wildcard cert update hooks for certbot-auto DNS authorization in Zone.ee VPS.
Some backstory: https://www.wizewarez.eu/2018/10/wildcard-certs-with-lets-encrypt-in-zoneee-linux-vps-using-zone-id-rest-api
ZoneID API reference: https://api.zone.eu/v2
jq (for parsing JSON responses from ZoneID API): https://stedolan.github.io/jq/
Upload these 3 files to your server.
When adding a new domain with certbot-auto, set --manual-auth-hook
and --manual-cleanup-hook
values as follows
--manual-auth-hook=/path/to/letsencrypt_add_dns.sh
--manual-cleanup-hook=/path/to/letsencrypt_remove_dns.sh
Set ZoneID API authentication env vars: ZONE_API_USER and ZONE_API_KEY. These will be used for adding/removing DNS entries.
A new DNS entry is added using ZoneID API. Once the DNS entry is added, script checks Google DNS servers(8.8.8.8) for DNS record propagation using dig
command.
Removes DNS entry using ZoneID API.
Used by both previous scripts to check that all required environment variables are present.