mirror of
https://github.com/frappe/bench.git
synced 2025-01-26 16:08:23 +00:00
fix: Updated command help and verbosity while setting crontab
This commit is contained in:
parent
87edc4e109
commit
c9abac299a
@ -111,7 +111,7 @@ def download_translations():
|
|||||||
download_translations_p()
|
download_translations_p()
|
||||||
|
|
||||||
|
|
||||||
@click.command('renew-lets-encrypt', help="Renew Let's Encrypt certificate")
|
@click.command('renew-lets-encrypt', help="Sets Up latest cron and Renew Let's Encrypt certificate")
|
||||||
def renew_lets_encrypt():
|
def renew_lets_encrypt():
|
||||||
from bench.config.lets_encrypt import renew_certs
|
from bench.config.lets_encrypt import renew_certs
|
||||||
renew_certs()
|
renew_certs()
|
||||||
|
@ -88,6 +88,8 @@ def run_certbot_and_setup_ssl(site, custom_domain, bench_path, interactive=True)
|
|||||||
def setup_crontab():
|
def setup_crontab():
|
||||||
job_command = '/opt/certbot-auto renew -a nginx --post-hook "systemctl reload nginx"'
|
job_command = '/opt/certbot-auto renew -a nginx --post-hook "systemctl reload nginx"'
|
||||||
job_comment = 'Renew lets-encrypt every month'
|
job_comment = 'Renew lets-encrypt every month'
|
||||||
|
print("Setting Up cron job to {0}".format(job_comment))
|
||||||
|
|
||||||
system_crontab = CronTab(user='root')
|
system_crontab = CronTab(user='root')
|
||||||
|
|
||||||
for job in system_crontab.find_comment(comment=job_comment): # Removes older entries
|
for job in system_crontab.find_comment(comment=job_comment): # Removes older entries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user