diff --git a/servers/skel/docker-compose.d/custom/nginx/entrypoint.sh b/servers/skel/docker-compose.d/custom/nginx/entrypoint.sh index d8ec00a..fa1fe3e 100644 --- a/servers/skel/docker-compose.d/custom/nginx/entrypoint.sh +++ b/servers/skel/docker-compose.d/custom/nginx/entrypoint.sh @@ -3,20 +3,19 @@ trap exit TERM if [ -n "${CERTBOT_DOMAINS}" ]; then - sleep 5 - echo "registering domains..." - - certbot --nginx -n --agree-tos \ + echo "registering..." + certbot --nginx -n --keep --agree-tos \ -m "${CERTBOT_EMAIL}" \ -d "${CERTBOT_DOMAINS}" while :; do echo "renewing domains..." - certbot --nginx -n renew - sleep 12h & wait $! + certbot --nginx --keep -n renew + sleep 12h & + wait $! done & else echo "skipping certbot due to no domains!" fi & -exec "$@" \ No newline at end of file +exec "$@"