xoxys.lego/templates/cron_lego_renew.sh.j2
Robert Kaussow 2fd883d291
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/push/docs unknown status
ci/woodpecker/push/notify Pipeline was successful
initial commit
2024-09-27 20:40:51 +02:00

16 lines
599 B
Django/Jinja

#!/bin/env bash
# run this script daily to renew any letsencrypt certs that need renewing
# renew cert if it expires within 30 days
export LEGO_SERVER="{{ lego_server }}"
export LEGO_PATH="{{ __lego_base_dir }}/.lego"
export CLOUDFLARE_EMAIL="{{ lego_cloudflare_email }}"
export CLOUDFLARE_API_KEY="{{ lego_cloudflare_api_key }}"
{% for cert in lego_certificates %}
echo "$(date) checking for cert update for {{ ', '.join(cert.domains) }}."
{{ __lego_bin_file }} --email="{{ cert.account_email }}" --domains {{ ' --domains '.join(cert.domains) }} --dns="cloudflare" renew --days 30
{% endfor %}