From 90ccccf18b71e1c3fe07fd92e863473ceb3447fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 17:44:19 +0000 Subject: [PATCH 1/2] Change certbot renewal schedule to quarterly Agent-Logs-Url: https://github.com/8bitDream/AmiiboAPI/sessions/3dd6435e-c3bf-4823-8118-e043ba3c3b14 Co-authored-by: AbandonedCart <1173913+AbandonedCart@users.noreply.github.com> --- README.md | 2 +- scripts/certbot_certificate.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index da0fde9..488cca8 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ This script: - Registers/requests a certificate with certbot (`amiiboapi.org,www.amiiboapi.org` by default) - Copies `fullchain.pem` and `privkey.pem` from `/etc/letsencrypt/live/amiiboapi.org/` into the project root - Sets file permissions to read/write for owner+group (`660`) on both certificate files -- Installs `/etc/cron.d/amiiboapi-certbot` to run renewal checks twice daily +- Installs `/etc/cron.d/amiiboapi-certbot` to run renewal checks every 3 months - `certbot renew` attempts renewal for certificates with 30 days or less remaining (90-day validity period) > [!IMPORTANT] diff --git a/scripts/certbot_certificate.sh b/scripts/certbot_certificate.sh index 634bc87..bd33ad0 100755 --- a/scripts/certbot_certificate.sh +++ b/scripts/certbot_certificate.sh @@ -80,7 +80,7 @@ install_renewal_schedule() { printf -v quoted_script_path '%q' "$SCRIPT_PATH" printf -v quoted_log_file '%q' "$LOG_FILE" cron_cmd="/bin/bash $quoted_script_path renew >> $quoted_log_file 2>&1" - cron_line="0 3,15 * * * root $cron_cmd" + cron_line="0 3 1 */3 * root $cron_cmd" run_as_root touch "$LOG_FILE" run_as_root chmod 644 "$LOG_FILE" @@ -95,7 +95,7 @@ Usage: $(basename "$0") [issue|renew|install-cron|all] Commands: issue Request/refresh the certificate for domains: $DOMAINS renew Run certbot renew and re-copy certificates to project root - install-cron Install /etc/cron.d schedule for daily renewal checks + install-cron Install /etc/cron.d schedule for quarterly renewal checks all issue + install-cron (default) Environment variables: From 584541d615418b724a9dfd57bcb4ab716ba9b474 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 17:47:09 +0000 Subject: [PATCH 2/2] Reduce certbot cron checks to monthly and update docs Agent-Logs-Url: https://github.com/8bitDream/AmiiboAPI/sessions/3dd6435e-c3bf-4823-8118-e043ba3c3b14 Co-authored-by: AbandonedCart <1173913+AbandonedCart@users.noreply.github.com> --- README.md | 2 +- scripts/certbot_certificate.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 488cca8..0905341 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ This script: - Registers/requests a certificate with certbot (`amiiboapi.org,www.amiiboapi.org` by default) - Copies `fullchain.pem` and `privkey.pem` from `/etc/letsencrypt/live/amiiboapi.org/` into the project root - Sets file permissions to read/write for owner+group (`660`) on both certificate files -- Installs `/etc/cron.d/amiiboapi-certbot` to run renewal checks every 3 months +- Installs `/etc/cron.d/amiiboapi-certbot` to run renewal checks monthly - `certbot renew` attempts renewal for certificates with 30 days or less remaining (90-day validity period) > [!IMPORTANT] diff --git a/scripts/certbot_certificate.sh b/scripts/certbot_certificate.sh index bd33ad0..5ec6109 100755 --- a/scripts/certbot_certificate.sh +++ b/scripts/certbot_certificate.sh @@ -80,7 +80,7 @@ install_renewal_schedule() { printf -v quoted_script_path '%q' "$SCRIPT_PATH" printf -v quoted_log_file '%q' "$LOG_FILE" cron_cmd="/bin/bash $quoted_script_path renew >> $quoted_log_file 2>&1" - cron_line="0 3 1 */3 * root $cron_cmd" + cron_line="0 3 1 * * root $cron_cmd" run_as_root touch "$LOG_FILE" run_as_root chmod 644 "$LOG_FILE" @@ -95,7 +95,7 @@ Usage: $(basename "$0") [issue|renew|install-cron|all] Commands: issue Request/refresh the certificate for domains: $DOMAINS renew Run certbot renew and re-copy certificates to project root - install-cron Install /etc/cron.d schedule for quarterly renewal checks + install-cron Install /etc/cron.d schedule for monthly renewal checks all issue + install-cron (default) Environment variables: