Skip to content

Commit eeea5a3

Browse files
committed
Support multiple-SAN certificates
1 parent f15d324 commit eeea5a3

File tree

1 file changed

+5
-1
lines changed
  • services.d/certbot

1 file changed

+5
-1
lines changed

services.d/certbot/run

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ if [ -z "$SERVERNAME" ]; then
55
exit 1
66
fi
77

8+
if ! [ -z "$EXTRANAMES" ]; then
9+
EXTRANAMES="-d $EXTRANAMES"
10+
fi
11+
812
echo Waiting for Nginx to come up...
913
until curl --connect-timeout 1 http://127.0.0.1/; do
1014
sleep 1s
@@ -14,7 +18,7 @@ echo Nginx has arrived.
1418
while true; do
1519

1620
if certbot certonly --non-interactive --webroot -w /usr/share/nginx/html --agree-tos \
17-
--rsa-key-size 2048 --keep-until-expiring --expand --register-unsafely-without-email -d $SERVERNAME; then
21+
--rsa-key-size 2048 --keep-until-expiring --expand --register-unsafely-without-email -d $SERVERNAME $EXTRANAMES; then
1822
cp /etc/letsencrypt/live/${SERVERNAME:-example.com}/privkey.pem /etc/letsencrypt/privkey-copy.pem
1923
cp /etc/letsencrypt/live/${SERVERNAME:-example.com}/fullchain.pem /etc/letsencrypt/fullchain-copy.pem
2024
nginx -s reload

0 commit comments

Comments
 (0)