Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 monthly
- `certbot renew` attempts renewal for certificates with 30 days or less remaining (90-day validity period)

> [!IMPORTANT]
Expand Down
4 changes: 2 additions & 2 deletions scripts/certbot_certificate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 * * root $cron_cmd"

run_as_root touch "$LOG_FILE"
run_as_root chmod 644 "$LOG_FILE"
Expand All @@ -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 monthly renewal checks
all issue + install-cron (default)

Environment variables:
Expand Down