CluPilotCloud/deploy
nexxo a21278eb52 Create the file the import needs, instead of writing that something else does
The comment in Caddyfile.example said install-agent.sh creates
/etc/caddy/clupilot-proxy-hosts.conf before anything imports it. It did not. I
wrote the claim and never built the thing, and the release notes repeated it as
an instruction.

Following that instruction would have taken the site down. An import of a
missing file makes the WHOLE Caddy configuration invalid — app.clupilot.com,
the portal, everything — and the operator would have been holding a step I told
them to take.

So the installer now does both halves itself: it creates the file, and it adds
the import line, then runs `caddy validate` and takes the line straight back out
if Caddy rejects it. Doing it in a script rather than in a comment is the
point — an instruction gets followed in the wrong order, a script does not.

And a second trap alongside it: a hostname written by hand in the Caddyfile is
now skipped when the generated file is rendered. Two site blocks for one name
make Caddy reject the entire configuration, so an operator who managed an
already-hand-written name in the console as well would have taken the public
site off the air with no visible connection between the two actions.

2037 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 23:35:13 +02:00
..
bootstrap Keep the platform on .com and the customers on .cloud 2026-07-30 21:04:08 +02:00
caddy Create the file the import needs, instead of writing that something else does 2026-07-30 23:35:13 +02:00
lib Stop the update agent dying on its own tag arithmetic 2026-07-29 00:00:17 +02:00
clupilot.env.example Show times on the operator's clock, keep storing them in UTC 2026-07-27 17:32:21 +02:00
install-agent.sh Create the file the import needs, instead of writing that something else does 2026-07-30 23:35:13 +02:00
install.sh Deploy as the application's user, and take back what root already took 2026-07-28 22:52:09 +02:00
update-agent.sh Manage hostnames and watch their certificates from the console 2026-07-30 22:55:55 +02:00
update.sh Manage hostnames and watch their certificates from the console 2026-07-30 22:55:55 +02:00