20 lines
493 B
Bash
Executable File
20 lines
493 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# if [ $(id -u) -ne 0 ]; then
|
|
# echo "This script must be run as root." > /dev/stderr
|
|
# exit 1
|
|
# fi
|
|
|
|
domains=$(cat domains.list | grep -v -E '^[[:space:]]*(#.*)?$')
|
|
|
|
docker exec -it nginx_proxy mkdir -p /var/www/certbot
|
|
|
|
$(dirname $0)/certbot \
|
|
certonly \
|
|
--agree-tos --renew-by-default \
|
|
--force-renewal \
|
|
--cert-name typename.fr \
|
|
-d $(echo typename.fr ${domains[*]} | tr ' ' ',')
|
|
|
|
docker compose restart
|