diff options
Diffstat (limited to '')
-rw-r--r-- | matrix-server/certbot/scripts/renew-certificates.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/matrix-server/certbot/scripts/renew-certificates.sh b/matrix-server/certbot/scripts/renew-certificates.sh new file mode 100644 index 0000000..e46d412 --- /dev/null +++ b/matrix-server/certbot/scripts/renew-certificates.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Certificates exist +if [ -d /etc/letsencrypt/live/davole.com ]; then + # Check certificates and renew them + certbot renew --http-01-port=380 + + # Concatenate certificates + . /etc/scripts/concatenate-certificates.sh + + # Update certificates in HAProxy + . /etc/scripts/update-haproxy-certificates.sh + +# Certificates don't exist +else + # Execute certificate creation script + . /etc/scripts/create-certificates.sh +fi |