Skip to content

Instantly share code, notes, and snippets.

@adhawkins
Created January 18, 2019 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adhawkins/748080a9c5019398eef727e84326f41f to your computer and use it in GitHub Desktop.
Save adhawkins/748080a9c5019398eef727e84326f41f to your computer and use it in GitHub Desktop.
Example of using certbot manual auth with Bytemark's DNS
certbot -d example.domain.com \
--preferred-challenges dns \
--manual \
--manual-auth-hook /root/manual-dns.sh \
--manual-cleanup-hook /root/manual-cleanup.sh \
--manual-public-ip-logging-ok \
certonly
/root/manual-dns.sh
===================
#!/bin/sh
echo "'_acme-challenge.${CERTBOT_DOMAIN}:${CERTBOT_VALIDATION}:60" > /tmp/certbot-handler.txt
scp /tmp/certbot-handler.txt admin@bytemark.domain.com:/srv/domain.com/config/dns/letsencrypt.txt
ssh admin@bytemark.domain.com sudo /usr/sbin/symbiosis-dns-generate
sleep 30
/root/manual-cleanup.sh
=======================
#!/bin/sh
rm /tmp/certbot-handler.txt
ssh admin@bytemark.domain.com rm /srv/domain.com/config/dns/letsencrypt.txt
ssh admin@bytemark.domain.com sudo /usr/sbin/symbiosis-dns-generate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment