Skip to content

Commit

Permalink
upload-certificate: cleanup old certificate config
Browse files Browse the repository at this point in the history
An uploaded custom certificate has precedence over a requested one. If
the same domain was requested before, the old configuration must be
cleaned.
  • Loading branch information
Amygos committed Aug 5, 2024
1 parent 7fd7092 commit 262edde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imageroot/actions/upload-certificate/22save_certificates
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ tls:
- certFile: /etc/traefik/custom_certificates/$cn_name.crt
keyFile: /etc/traefik/custom_certificates/$cn_name.key
EOF

#clenaup existing requested certificate if exists
if [ -f "configs/certificate-${cn_name}.yml" ]; then
rm -f "configs/certificate-${cn_name}.yml"
fi

0 comments on commit 262edde

Please sign in to comment.