Skip to content

Commit

Permalink
fix: force renew on monthly bases
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekbalam committed Sep 8, 2020
1 parent 7a7b0fe commit 7dcd5f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench/config/lets_encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit 7dcd5f9

Please sign in to comment.