Commit 4c1204b0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

nginx-le.sh: add support for config file path, not domain name only

parent 0d6addb8
......@@ -5,6 +5,11 @@ shift
[ -n "$DOMAIN" ] || exit
if [ -r "$DOMAIN" ] ; then
NCONF="$DOMAIN"
DOMAIN=$(basename "$DOMAIN" .conf)
fi
DIR=/var/spool/nginx/tmp/client
[ -d "$DIR" ] || DIR=/var/lib/nginx/tmp/client
......@@ -15,7 +20,7 @@ serv nginx reload || exit
letsencrypt certonly --webroot -w$DIR -d $DOMAIN $@ || exit
NCONF=/etc/nginx/sites-enabled.d/$DOMAIN.conf
[ -n "$NCONF" ] || 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
......
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