Created
January 18, 2019 13:59
-
-
Save adhawkins/748080a9c5019398eef727e84326f41f to your computer and use it in GitHub Desktop.
Example of using certbot manual auth with Bytemark's DNS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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