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,17 +3,16 @@
trap exit TERM trap exit TERM
if [ -n "${CERTBOT_DOMAINS}" ]; then if [ -n "${CERTBOT_DOMAINS}" ]; then
sleep 5 echo "registering..."
echo "registering domains..." certbot --nginx -n --keep --agree-tos \
certbot --nginx -n --agree-tos \
-m "${CERTBOT_EMAIL}" \ -m "${CERTBOT_EMAIL}" \
-d "${CERTBOT_DOMAINS}" -d "${CERTBOT_DOMAINS}"
while :; do while :; do
echo "renewing domains..." echo "renewing domains..."
certbot --nginx -n renew certbot --nginx --keep -n renew
sleep 12h & wait $! sleep 12h &
wait $!
done & done &
else else
echo "skipping certbot due to no domains!" echo "skipping certbot due to no domains!"