set certbot.env file

This commit is contained in:
deflax 2023-12-31 02:46:03 +00:00
parent 0c3149b867
commit bb9789fd54
3 changed files with 20 additions and 0 deletions

4
.gitignore vendored
View file

@ -158,3 +158,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# tv
certbot.env

2
certbot.env.dist Normal file
View file

@ -0,0 +1,2 @@
BASE_URL=example.com
EMAIL=info@example.com

14
renew-certificates.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
source certbot.env
CB=`docker ps | grep certbot | cut -d ' ' -f 1`
echo $BASE_URL
echo $EMAIL
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 stream.$BASE_URL \
-d tv.$BASE_URL -d stream.$BASE_URL -d vod.$BASE_URL
cat "./data/certbot/etc/live/stream.$BASE_URL/privkey.pem" "./data/certbot/etc/live/stream.$BASE_URL/fullchain.pem" > "./data/certificates/stream.$BASE_URL.pem"
docker kill -s USR2 television_haproxy_1