Skip to content

Commit

Permalink
Replace certbot cron with systemd timer.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Apr 14, 2024
1 parent 276ea5b commit 8f7b990
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .ebextensions/21-certbot.config
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,35 @@
# # Reload the nginx configuration every time, since there may be multiple servers running. Using --renew-hook would only reload nginx on the server that made the renewal.
# systemctl reload nginx.service
#
# /etc/cron.d/certbot:
# /etc/systemd/system/certbot-renew.service:
# mode: "000644"
# owner: root
# group: root
# content: |
# @daily root /opt/certbot-renew
# [Unit]
# Description="Service that runs /opt/certbot-renew"
# Requires=certbot-renew.timer
# [Service]
# Type=simple
# ExecStart=/opt/certbot-renew
#
# /etc/systemd/system/certbot-renew.timer:
# mode: "000644"
# owner: root
# group: root
# content: |
# [Unit]
# Description="Timer for certbot-renew.service"
# [Timer]
# Unit=certbot-renew.service
# OnBootSec=5m
# OnUnitActiveSec=1d
# [Install]
# WantedBy=timers.target
#
# container_commands:
# "01-enable-timer":
# command: |
# systemctl daemon-reload
# systemctl enable certbot-renew.timer
# systemctl start certbot-renew.timer

0 comments on commit 8f7b990

Please sign in to comment.