2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 00:21:23 +00:00

fix: force renew on monthly bases

This commit is contained in:
Abhishek Balam 2020-09-08 12:15:35 +05:30
parent 7a7b0fea37
commit 7dcd5f9ce3

View File

@ -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()