aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-server/certbot/scripts/renew-certificates.sh
blob: ff56115d29d6f8b219d049a66808eb606d2b1ebe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

echo "running renew certs..."
# Certificates exist
if [ -d /etc/letsencrypt/live/terminaldweller.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