Created
March 6, 2016 14:31
-
-
Save moritzheiber/3590959b1032ed5f40df to your computer and use it in GitHub Desktop.
Renew domains with Let's Encrypt
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 -xeu | |
| declare -a DOMAINS | |
| DOMAINS=(enter your domains here) # separated by spaces | |
| DIR="/tmp/letsencrypt-auto" | |
| LETSENCRYPT="/home/moe/letsencrypt" | |
| URL="https://acme-v01.api.letsencrypt.org/directory" | |
| STAGING_URL="https://acme-staging.api.letsencrypt.org/directory" | |
| EMAIL="your@email.here" | |
| if [ "${1}" == "--test" ] ; then | |
| URL="${STAGING_URL}" | |
| fi | |
| mkdir -p "${DIR}" && | |
| for domain in "${DOMAINS[@]}" ; do | |
| "${LETSENCRYPT}"/letsencrypt-auto certonly \ | |
| --server "${URL}" \ | |
| -a webroot \ | |
| --webroot-path="${DIR}" \ | |
| --strict-permissions \ | |
| --agree-tos \ | |
| --text \ | |
| --keep \ | |
| --email "${EMAIL}" \ | |
| -d ${domain} | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment