This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
self-hosting/nginx/nginx/entrypoint.sh

20 lines
447 B
Bash
Raw Normal View History

2021-04-23 16:26:32 +02:00
#!/usr/bin/env sh
# Start cron
/usr/sbin/crond -d 8 &
# Renew all certificates
for url in $(env | grep '^[^=]\+_DOMAIN=' | sed 's/^.*\?=\(.*\)$/\1/g') $(echo "$DOMAINS" | sed 's/,/ /g')
do
2021-04-23 21:46:35 +02:00
certbot certonly \
2021-04-23 16:26:32 +02:00
--standalone \
-d "$url" \
--email "$EMAIL" \
-n \
--agree-tos \
--expand
done
# The original script handles the template subsitution
exec /docker-entrypoint.sh nginx -g "daemon off;"