2019-12-24 14:30:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-29 11:33:31 +00:00
|
|
|
# if [ $(id -u) -ne 0 ]; then
|
|
|
|
# echo "This script must be run as root." > /dev/stderr
|
|
|
|
# exit 1
|
|
|
|
# fi
|
2019-12-24 14:30:03 +00:00
|
|
|
|
|
|
|
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 ' ' ',')
|
|
|
|
|
2023-06-04 19:02:28 +00:00
|
|
|
docker compose restart
|