web: fix letsencrypt renewal

This commit is contained in:
Matthias Herzog 2020-01-07 17:00:45 +01:00 committed by Saúl Ibarra Corretgé
parent a1e8bbdead
commit 9b17c0548d
1 changed files with 10 additions and 1 deletions

View File

@ -18,7 +18,16 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
-d $LETSENCRYPT_DOMAIN \
--agree-tos \
--email $LETSENCRYPT_EMAIL
cp /defaults/letsencrypt-renew /etc/cron.monthly/
fi
# remove default certbot renewal
if [[ -f /etc/cron.d/certbot ]]; then
rm /etc/cron.d/certbot
fi
# setup certbot renewal script
if [[ ! -f /etc/cron.daily/letencrypt-renew ]]; then
cp /defaults/letsencrypt-renew /etc/cron.daily/
fi
else
# use self-signed certs