feat: add keep flag
This commit is contained in:
parent
60ea0f3268
commit
5570b9c4d6
1 changed files with 6 additions and 7 deletions
|
@ -3,17 +3,16 @@
|
|||
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!"
|
||||
|
|
Loading…
Reference in a new issue