feat: default nginx config

This commit is contained in:
Strix 2023-10-20 02:09:03 +02:00
parent ee4b9a6ee6
commit b9950596bb
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
6 changed files with 137 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#!/bin/sh
trap exit TERM
if [ -n "${CERTBOT_DOMAINS}" ]; then
echo "registering domains..."
certbot --nginx -n --agree-tos \
-m "${CERTBOT_EMAIL}" \
-d "${CERTBOT_DOMAINS}"
while :; do
echo "renewing domains..."
certbot --nginx -n renew
nginx -s reload
sleep 12h & wait $!
done &
else
echo "skipping certbot due to no domains!"
fi
exec nginx -g "daemon off;"