From 7dcd5f9ce3c3322f0a5d96f1b9624c6215f76448 Mon Sep 17 00:00:00 2001 From: Abhishek Balam Date: Tue, 8 Sep 2020 12:15:35 +0530 Subject: [PATCH] fix: force renew on monthly bases --- bench/config/lets_encrypt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bench/config/lets_encrypt.py b/bench/config/lets_encrypt.py index 872cd129..f9e596e0 100755 --- a/bench/config/lets_encrypt.py +++ b/bench/config/lets_encrypt.py @@ -86,11 +86,11 @@ def run_certbot_and_setup_ssl(site, custom_domain, bench_path, interactive=True) def setup_crontab(): - job_command = '/opt/certbot-auto renew -a nginx --post-hook "systemctl reload nginx"' + job_command = '/opt/certbot-auto renew --force-renewal -a nginx --post-hook "systemctl reload nginx"' system_crontab = CronTab(user='root') if job_command not in str(system_crontab): job = system_crontab.new(command=job_command, comment="Renew lets-encrypt every month") - job.every(1).day() + job.setall('0 0 1 * *') # Run at 00:00 on every day-of-month 1 system_crontab.write()