Provide an iCal web feed for certificate expiry.
There are a couple of ways to run this
You can download one of the binaries and run it as a standalone:
% ./certcal serve --help
Usage: certcal serve --hosts=HOSTS,... --interval="24h"
run the server.
Flags:
-h, --help Show context-sensitive help.
--hosts=HOSTS,... hosts to check certs for ($CERTCAL_HOSTS).
--interval="24h" interval in which to check certs ($CERTCAL_INTERVAL)
--port=3000 port for the server to listen on ($PORT)
% PORT=3000 CERTCAL_INTERVAL=5h CERTCAL_HOSTS="unwiredcouch.com" ./certcal
You can include the handler in your existing mux, something along the lines of:
import (
"github.com/mrtazz/certcal/handler"
"github.com/mrtazz/certcal/hosts"
"net/http"
"time"
)
func Run() {
...
hosts.AddHosts([]string{"unwiredcouch.com"})
hosts.UpdateEvery(5 * time.Hour)
http.HandleFunc("/hosts", handler.Handler)
http.ListenAndServe(":3000", nil)
}
There is a docker image as well that you can use:
docker pull ghcr.io/mrtazz/certcal
Probably. But sometimes they aren't.
Maybe, up to you.
That is by design. The UID of the VEVENT
is the sha256sum
of the summary
of the event. Because generally if the cert got renewed the old event is just
cruft.
genuinetools/certok inspired this