Commit 182fafd8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

nginx_le: allow use many domains

parent 153ecd6f
......@@ -11,11 +11,13 @@ DIR=/var/spool/nginx/tmp/client
serv nginx reload || exit
letsencrypt certonly --webroot -w$DIR -d $DOMAIN || exit
letsencrypt certonly --webroot -w$DIR -d $@ || exit
NCONF=/etc/nginx/sites-enabled.d/$DOMAIN.conf
KEY=/etc/letsencrypt/live/$DOMAIN/privkey.pem
PEM=/etc/letsencrypt/live/$DOMAIN/fullchain.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
......
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