Discovered live: upgrading the test server to v0.2.0 crash-looped with "rules: read dir: open .: no such file or directory". Its /etc/deklarix/deklarix.env predates RULES_DIR entirely (created on first install, before that variable existed) — postinst never overwrites an existing env file, by design, so the variable was simply missing rather than set. main.go's relative default "rules" then resolved against WorkingDirectory=/var/lib/deklarix instead of the actual install path (/usr/share/deklarix/rules). postinst now appends RULES_DIR with its packaged default whenever it's absent, on both fresh installs and upgrades — never overwriting an existing value. Same healing pattern enconf uses for DB_SSLMODE. Verified: reinstalling over the broken config fixed it and the service came back up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4.1 KiB
Executable File
4.1 KiB
Executable File