vod-rtmp/issue-certificate.sh

14 lines
418 B
Bash
Raw Normal View History

2021-10-10 09:39:51 -04:00
#!/bin/bash
CB=`docker ps --format='{{.Names}}' --filter=label=meta.role=certbot`
EMAIL=$2
CERTNAME=$1
DOMAIN=$1
docker exec $CB certbot certonly --non-interactive --standalone --email $2 --agree-tos --keep --preferred-challenges http --cert-name "$CERTNAME" -d "$DOMAIN"
2021-10-10 12:08:53 -04:00
cat "./data/certbot/etc/live/$CERTNAME/privkey.pem" "./data/certbot/etc/live/$CERTNAME/fullchain.pem" > "./data/certificates/$CERTNAME.pem"