Last active
June 6, 2023 10:24
-
-
Save Himura2la/f8e6e2f51b1728a1b354ac163d4010ab to your computer and use it in GitHub Desktop.
Renew a wildcard certificate using certbot
This file contains hidden or 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 | |
set -xe | |
export domain='change.me' | |
certbot --config ./cli-certbot.ini certonly -d "*.$domain" | |
# Follow the instructions. | |
ansible-vault encrypt "./tmp/config/live/$domain/privkey.pem" --output "./${domain}_privkey.pem.vault" | |
cat "./tmp/config/live/$domain/fullchain.pem" > "./${domain}_fullchain.pem" | |
find ./tmp -type f -name '*key*' -exec chmod -v u+w '{}' \; -exec shred -v '{}' \; && rm -r ./tmp | |
# deploy the certificate all over your infrastructure |
This file contains hidden or 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
email = [email protected] | |
config-dir=./tmp/config | |
work-dir=./tmp/work | |
logs-dir=./tmp/logs | |
no-eff-email = true | |
agree-tos = true | |
manual = true | |
preferred-challenges = dns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment