I *think* the #configuration #reload support for #swad is complete now (minus docs). But I'll have a lot to test, because it actually does a lot. 🙈
* Update several global properties like whether or not to resolve remote hosts, the route for the login endpoint, the directory where to look for custom resources (templates/style) ...
* Update the session creation rate limit ONLY on changes.
* Update all credentials checkers simply by re-creating them, here assuming the same name means the same semantics.
* Update all realms, versioning them (only when changed), as well as their and the global failed login rate limit, so the authenticator can know from the version whether something should be considered stale.
* Update all "servers" trying to do as little as possible on them: If port, hosts to bind to and protocol preference (IPv4/IPv6) stays the same, only enable/disable TLS if needed, and for enabled TLS, recreate the OpenSSL context to use a potentially changed certificate. Otherwise, do a "graceful shutdown" (stop listening, but keep connections alive) and create a NEW server.
* Attempt to reload any custom templates and a custom style.css from the resources dir.
Some settings are silently ignored on reload because there's no sane way to change them mid-flight, for example user/group to run as, the pidfile location, the threadpool configuration ...
All this also needs to be documented, plus a special pitfall when starting as root, but dropping privileges: Initial configuration happens while still privileged, so we can bind to low (privileged) ports, run the pam helper as root, and read files only root can read ... all of this could break on reloading the config. 🤪
#C #daemon #coding