mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-08-07 15:38:43 +09:00
e857f808b0
Add CERT_PROFILE env var for Let's Encrypt cert profiles. Run certbot twice daily via a cron entry with a random delay instead of the previous sed-based cron randomization. Update changelog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 lines
501 B
Plaintext
Executable File
12 lines
501 B
Plaintext
Executable File
#!/usr/bin/with-contenv bash
|
|
# shellcheck shell=bash
|
|
|
|
# Check if the cert is expired or expires within a day, if so, renew
|
|
if openssl x509 -in /config/keys/letsencrypt/fullchain.pem -noout -checkend 86400 >/dev/null; then
|
|
echo "The cert does not expire within the next day. Letting the cron script handle the renewal attempts."
|
|
else
|
|
echo "The cert is either expired or it expires within the next day. Attempting to renew. This could take up to 10 minutes."
|
|
/app/le-renew.sh
|
|
sleep 1
|
|
fi
|