Created
November 22, 2017 22:13
-
-
Save alexras/eb082a350d8bd72533f7432ce9ead5f7 to your computer and use it in GitHub Desktop.
Update LetsEncrypt certs on S3
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 | |
# Assumes you're running in a virtualenv with | |
# https://github.com/dlapiduz/certbot-s3front installed | |
function update_cert | |
{ | |
BUCKET_NAME=$1 | |
DOMAIN_NAME=$2 | |
DISTRIBUTION_ID=$3 | |
REGION=us-west-1 | |
certbot --agree-tos -a certbot-s3front:auth \ | |
--certbot-s3front:auth-s3-bucket ${BUCKET_NAME} \ | |
--certbot-s3front:auth-s3-region ${REGION} \ | |
-i certbot-s3front:installer \ | |
--certbot-s3front:installer-cf-distribution-id ${DISTRIBUTION_ID} \ | |
-d ${DOMAIN_NAME} -d www.${DOMAIN_NAME} \ | |
--config-dir=conf --logs-dir=logs --work-dir=work | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment