add dockerfile and scripts

This commit is contained in:
2024-11-02 13:09:02 +03:00
commit a09ac126d7
5 changed files with 82 additions and 0 deletions

19
scripts/1-renew-cert.sh Normal file
View File

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