Last active
November 10, 2020 08:51
-
-
Save tjarksaul/1584718a2f9fbd8ed9a65bc336560a8b to your computer and use it in GitHub Desktop.
Certbot with DNS validation and tinydns
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
#!/bin/bash | |
DOMAIN="example.tld" | |
certbot certonly -n --preferred-challenges dns --manual --manual-public-ip-logging-ok --manual-auth-hook /usr/local/bin/tinydns-certbot-enable --manual-cleanup-hook /usr/local/bin/tinydns-certbot-disable -d $DOMAIN -d \*.$DOMAIN |
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
#!/bin/bash | |
# From https://blog.fugue88.ws/archives/2019-03/certbot-and-tinydns | |
cd /etc/tinydns | |
sed -ri '/^# BEGIN CERTBOT AUTH$/,/^# END CERTBOT AUTH$/d' data | |
make |
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
#!/bin/bash | |
# From https://blog.fugue88.ws/archives/2019-03/certbot-and-tinydns | |
cd /etc/tinydns | |
cat <<EOF >> data | |
# BEGIN CERTBOT AUTH | |
'_acme-challenge.$CERTBOT_DOMAIN:$CERTBOT_VALIDATION | |
# END CERTBOT AUTH | |
EOF | |
export -n CERTBOT_VALIDATION | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment