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