feat: add keep flag

This commit is contained in:
Strix 2023-10-20 03:38:28 +02:00
parent 60ea0f3268
commit 5570b9c4d6
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774

View file

@ -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 "$@"
exec "$@"