Files
certbot/docker/scripts/1-renew-cert.sh
2025-08-13 13:54:43 +03:00

20 lines
447 B
Bash

#!/bin/sh
# Certificates exist
if [ -n "$CERTBOT_DOMAIN" -a -d /etc/letsencrypt/live/"$CERTBOT_DOMAIN" ]; then
# Check certificates and renew them
certbot renew --http-01-port=380
# Concatenate certificates
. $(dirname $0)/2-concatenate-cert.sh
# Update certificates in HAProxy
. $(dirname $0)/3-update-haproxy-cert.sh
# Certificates don't exist
else
# Execute certificate creation script
. $(dirname $0)/0-create-cert.sh
fi