-
-
Save basert/0a846b4f0e4e78936b56 to your computer and use it in GitHub Desktop.
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
LETSENCRYPT_PATH=$HOME/letsencrypt | |
TMP_PATH="/tmp/letsencrypt-auto" | |
DOMAINS=( | |
"-d example.com -d www.example.com" | |
) | |
# create webroot dir | |
mkdir -p $TMP_PATH | |
# pull the latest version for letsencrypt repo | |
(cd $LETSENCRYPT_PATH && git pull) | |
echo "STARTING REQUESTS OF NEW CERTS" | |
for d in "${DOMAINS[@]}" | |
do | |
echo "$LETSENCRYPT_PATH/letsencrypt-auto certonly --renew-by-default --agree-tos --rsa-key-size 4096 --webroot -w $TMP_PATH $d" | |
$LETSENCRYPT_PATH/letsencrypt-auto certonly --renew-by-default --agree-tos --rsa-key-size 4096 --webroot -w $TMP_PATH $d | |
done | |
echo "RELOADING NGINX SERVER" | |
/usr/sbin/nginx -s reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment