Skip to content

Commit

Permalink
Improved run notification
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Aug 29, 2024
1 parent 177fd84 commit 22f9b75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ run_certbot

# Infinite loop to keep the container running and periodically check for renewals
while true; do
echo "Next certificate renewal check will be in ${RENEWAL_INTERVAL} seconds"
next_run=$(date -d "@$(($(date +%s) + RENEWAL_INTERVAL))" '+%Y-%m-%d %H:%M:%S')
echo "Next certificate renewal check will be at ${next_run}"
sleep "$RENEWAL_INTERVAL"
if ! run_certbot; then
echo "Error: Certificate renewal failed. Exiting."
Expand Down

0 comments on commit 22f9b75

Please sign in to comment.