television/renew-certificates.sh

15 lines
523 B
Bash
Raw Permalink Normal View History

2023-12-30 21:46:03 -05:00
#!/bin/bash
2023-12-31 09:32:41 -05:00
source variables.env
2023-12-30 21:46:03 -05:00
CB=`docker ps | grep certbot | cut -d ' ' -f 1`
2024-01-03 23:07:31 -05:00
#echo $BASE_URL
#echo $EMAIL
2023-12-30 21:46:03 -05:00
2024-09-07 10:40:06 -04:00
docker exec $CB certbot certonly --non-interactive --standalone --http-01-address 0.0.0.0 --email $EMAIL --agree-tos --keep --preferred-challenges http --cert-name $BASE_URL \
-d $BASE_URL -d api.$BASE_URL -d stream.$BASE_URL
2023-12-30 21:46:03 -05:00
2024-09-07 10:40:06 -04:00
cat "./data/certbot/etc/live/$BASE_URL/privkey.pem" "./data/certbot/etc/live/$BASE_URL/fullchain.pem" > "./data/certificates/$BASE_URL.pem"
2023-12-30 21:46:03 -05:00
docker kill -s USR2 television_haproxy_1