#!/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