20 lines
447 B
Bash
Executable File
20 lines
447 B
Bash
Executable File
#!/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
|
|
certbot certonly \
|
|
--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;"
|