Commit 6c3924dc authored by Vitaly Lipatov's avatar Vitaly Lipatov

certs/nginx-le.sh: add trusted replacement

parent bf92160f
......@@ -17,10 +17,12 @@ letsencrypt certonly --webroot -w$DIR -d $DOMAIN $@ || exit
NCONF=/etc/nginx/sites-enabled.d/$DOMAIN.conf
KEY=/etc/letsencrypt/live/$DOMAIN/privkey.pem
PEM=/etc/letsencrypt/live/$DOMAIN/fullchain.pem
CHAIN=/etc/letsencrypt/live/$DOMAIN/chain.pem
# TODO: add these lines
SP="[ ]"
subst "s|\(ssl_certificate$SP\)\($SP*\).*|\1\2$PEM;|g" $NCONF
subst "s|\(ssl_certificate_key$SP\)\($SP*\).*|\1\2$KEY;|g" $NCONF
subst "s|\(ssl_trusted_certificate$SP\)\($SP*\).*|\1\2$CHAIN;|g" $NCONF
serv nginx reload || exit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment