web: always try to renew cert on container boot

acme.sh is smart enough to not send the request out unless it's necessary.
pull/1000/head
Saúl Ibarra Corretgé 4 years ago
parent 73acbade59
commit d27336bece
  1. 3
      web/rootfs/etc/cont-init.d/10-config

@ -14,7 +14,7 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
pushd /opt
sh ./acme.sh --install --home /config/acme.sh --accountemail $LETSENCRYPT_EMAIL
popd
if [[ ! -f /config/acme-certs/$LETSENCRYPT_DOMAIN/fullchain.pem ]]; then
STAGING=""
if [[ $LETSENCRYPT_USE_STAGING -eq 1 ]]; then
STAGING="--staging"
@ -37,6 +37,7 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
echo "Exiting."
exit 1
fi
if [[ $rc -eq 0 ]]; then
mkdir -p /config/acme-certs/$LETSENCRYPT_DOMAIN
if ! /config/acme.sh/acme.sh \
--install-cert -d $LETSENCRYPT_DOMAIN \

Loading…
Cancel
Save