Skip to content

Commit

Permalink
Sync haproxy certs during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
richturner committed Apr 3, 2022
1 parent 7ba31b7 commit c7d9e0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ cron_auto_renewal_init() {
done
IFS=$IFS_OLD

# Remove any stale/obsolete certificates
# Remove any stale/obsolete certificates and check haproxy full chain file exists
DIRS=$(ls -1d ${LE_DIR}/live/* 2>/dev/null)
IFS_OLD=$IFS
IFS=$'\n'
Expand All @@ -351,6 +351,9 @@ cron_auto_renewal_init() {
if [[ "$DOMAINNAMES" != "$CERT"* ]] && [[ "$DOMAINNAMES" != *",$CERT"* ]]; then
log_info "Removing obsolete certificate for '$CERT'"
remove "$CERT"
else
RENEWED_LINEAGE="$LE_DIR/live/$CERT"
sync_haproxy
fi
done
IFS=$IFS_OLD
Expand Down

0 comments on commit c7d9e0e

Please sign in to comment.