change variable names
This commit is contained in:
@@ -7,8 +7,8 @@ services:
|
||||
image: registry.bitdeals.org/certbot
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DOMAIN=
|
||||
- EMAIL= # optional for notifications
|
||||
- CERTBOT_DOMAIN=
|
||||
- CERTBOT_EMAIL= # optional for notifications
|
||||
volumes:
|
||||
- certificates:/etc/certificates
|
||||
- letsencrypt:/etc/letsencrypt
|
||||
|
||||
@@ -11,20 +11,20 @@ if [ ! -f /etc/certificates/site.pem ]; then
|
||||
fi
|
||||
|
||||
# check e-mail for letsencrypt notifications
|
||||
if [ -n "$EMAIL" ]; then
|
||||
CERTBOT_OPTS="--email $EMAIL"
|
||||
if [ -n "$CERTBOT_EMAIL" ]; then
|
||||
CERTBOT_OPTS="--email $CERTBOT_EMAIL"
|
||||
else
|
||||
CERTBOT_OPTS="--register-unsafely-without-email"
|
||||
fi
|
||||
|
||||
if [ -n "$DOMAIN" ]; then
|
||||
if [ -n "$CERTBOT_DOMAIN" ]; then
|
||||
|
||||
# Request certificate
|
||||
certbot certonly --standalone \
|
||||
--non-interactive --agree-tos --http-01-port=380 \
|
||||
"$CERTBOT_OPTS" \
|
||||
--cert-name "$DOMAIN" \
|
||||
-d "$DOMAIN"
|
||||
--cert-name "$CERTBOT_DOMAIN" \
|
||||
-d "$CERTBOT_DOMAIN"
|
||||
|
||||
# Concatenate certificates
|
||||
. $(dirname $0)/2-concatenate-cert.sh
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Certificates exist
|
||||
if [ -n "$DOMAIN" -a -d /etc/letsencrypt/live/"$DOMAIN" ]; then
|
||||
if [ -n "$CERTBOT_DOMAIN" -a -d /etc/letsencrypt/live/"$CERTBOT_DOMAIN" ]; then
|
||||
# Check certificates and renew them
|
||||
certbot renew --http-01-port=380
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /etc/letsencrypt/live/"$DOMAIN"
|
||||
cd /etc/letsencrypt/live/"$CERTBOT_DOMAIN"
|
||||
|
||||
if [ -f fullchain.pem -a -f privkey.pem ]; then
|
||||
cat fullchain.pem privkey.pem > /etc/certificates/site.pem
|
||||
|
||||
Reference in New Issue
Block a user