From 095b644ae0e9388cbf4bd6f7b85eca87a1a8b32f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 10 Aug 2017 20:52:57 +0200 Subject: [PATCH] Created DNS-01 hook for DuckDNS (markdown) --- DNS-01-hook-for-DuckDNS.md | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 DNS-01-hook-for-DuckDNS.md diff --git a/DNS-01-hook-for-DuckDNS.md b/DNS-01-hook-for-DuckDNS.md new file mode 100644 index 0000000..4297ac5 --- /dev/null +++ b/DNS-01-hook-for-DuckDNS.md @@ -0,0 +1,39 @@ +The following hook will work for the DNS-01 challenge with [duckdns.org](https://www.duckdns.org) + +```bash +#!/usr/bin/env bash + +# +# dns-01 challenge for DuckDNS +# https://www.duckdns.org/spec.jsp + +set -e +set -u +set -o pipefail + +domain="your-domain" +token="your-token" + +case "$1" in + "deploy_challenge") + curl "https://www.duckdns.org/update?domains=$domain&token=$token&txt=$4" + echo + ;; + "clean_challenge") + curl "https://www.duckdns.org/update?domains=$domain&token=$token&txt=removed&clear=true" + echo + ;; + "deploy_cert") + ;; + "unchanged_cert") + ;; + "startup_hook") + ;; + "exit_hook") + ;; + *) + echo Unknown hook "${1}" + exit 0 + ;; +esac +``` \ No newline at end of file