[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26685: certbot service
From: |
Clément Lassieur |
Subject: |
bug#26685: certbot service |
Date: |
Fri, 28 Apr 2017 11:24:47 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Hi Andy,
Thanks for working on this!
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2016 ng0 <address@hidden>
> +;;; Copyright © 2016 Sou Bunnbu <address@hidden>
Or maybe you didn't work on this?..
> +(define certbot-renewal-jobs
> + (match-lambda
> + (($ <certbot-configuration> package webroot hosts default-location)
> + (match hosts
> + ;; Avoid pinging certbot if we have no hosts.
> + (() '())
> + (_
> + (list
> + ;; Attempt to renew the certificates twice a week.
> + #~(job (lambda (now)
> + (next-day-from (next-hour-from now '(3))
> + '(2 5)))
This is not twice a week, but twice a month at days 2 and 5, because
'next-day-from' will look after the next day (in month) that has number
2 and 5. 'next-hour-from' is not taken into account because next day
from any hour still runs at 0 o'clock.
But anyway I think it should be twice a day, and at a random minute
within the hour, as advised by certbot:
--8<---------------cut here---------------start------------->8---
from https://certbot.eff.org/all-instructions/
if you're setting up a cron or systemd job, we recommend running it
twice per day (it won't do anything until your certificates are due for
renewal or revoked, but running it regularly would give your site a
chance of staying online in case a Let's Encrypt-initiated revocation
happened for some reason). Please select a random minute within the hour
for your renewal tasks.
--8<---------------cut here---------------end--------------->8---
What do you think of:
'(next-minute-from (next-hour '(0 12)) (list (random 60)))
instead? Schedules can be debbuged with '--schedule=count' option.
Also I think some services have to be reloaded/restarted after their
certificates are upgraded. That could be done via a mcron post-hook,
but I'm not sure how to pass the list of services that have to be
restarted. WDYT?
Clément