[Bug 274085] www/caddy: Add forcereload command to rc script

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 25 Sep 2023 18:08:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274085

            Bug ID: 274085
           Summary: www/caddy: Add forcereload command to rc script
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: adamw@FreeBSD.org
          Reporter: tom@heimdall.pm
             Flags: maintainer-feedback?(adamw@FreeBSD.org)
          Assignee: adamw@FreeBSD.org

Created attachment 245223
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=245223&action=edit
Proposed patch for www/caddy

External TLS certificates (e.g. managed by acme.sh) are not reloaded by `caddy
reload` unless Caddy's configuration has changed. Caddy added a `--force` flag
which makes it reload everything (including TLS certs) no matter what for this
use case.

Currently, the caddy rc script has a `reload` directive which does a regular
Caddy reload (which doesn't reload external certificates). This patch adds a
`forcereload` command which, as its name implies, makes Caddy reload everything
(using `caddy reload --force`).

This way, Caddy can reload external certificates when they change (for
instance, using acme.sh's `RenewHook`) without needing a full restart (thus
keeping active connections alive) or `curl`-ing Caddy's admin API to do a full
reload.

Thanks a lot in advance :)

-- 
You are receiving this mail because:
You are the assignee for the bug.