Skip to content

Instantly share code, notes, and snippets.

@UnixSage
Last active November 13, 2019 17:05
Show Gist options
  • Save UnixSage/43c91aaa8e1824a5d6de70b2cb216e37 to your computer and use it in GitHub Desktop.
Save UnixSage/43c91aaa8e1824a5d6de70b2cb216e37 to your computer and use it in GitHub Desktop.
Script to use with CertBot's --manual-auth-hook switch
#!/bin/sh
TOKEN="Your-Duck-DNS-Token"
BASEDOMAIN=`echo ${CERTBOT_DOMAIN} | awk -F. '{OFS="."; print $(NF-1),$(NF)}'`
echo $CERTBOT_DOMAIN
curl "https://www.duckdns.org/update?domains=${CERTBOT_DOMAIN}&token=${TOKEN}&txt=${CERTBOT_VALIDATION}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment