deb postinst starts crowdsec without honoring policy-rc.d
What happened?
The deb postinst starts the agent with a plain systemctl start crowdsec, so it ignores /usr/sbin/policy-rc.d. We install crowdsec on fresh hosts with our acquisition files already in place, and acquis.d/appsec.yaml points to crowdsecurity/appsec-bot-* configs that we install from the hub right after the package. Our policy-rc.d holds the service during apt-get install, but the postinst starts it anyway, the agent exits with no installed appsec-config matches pattern "crowdsecurity/appsec-bot-*", and dpkg --configure fails.
What did you expect to happen?
The postinst honors policy-rc.d like other packages do through deb-systemd-invoke (or invoke-rc.d), as Debian Policy 9.3.3 asks.
How can we reproduce it?
- Add a
policy-rc.dthat returns 101 forcrowdsec. apt-get install crowdsec.- The service is started anyway.
Anything else we need to know?
deb-systemd-invoke comes from init-system-helpers, which is Essential on Debian and Ubuntu. Fix: https://github.com/AdzerKI/crowdsec/commit/9b9bfe62
Crowdsec version
$ cscli version
version: v1.8.2-debian-pragmatic-amd64
build/debian/postinst is the same on master.
OS version
Ubuntu 26.04
@AdzerKI: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
- Check Crowdsec Documentation to see if your issue can be self resolved.
- You can also join our Discord.
- Check Releases to make sure your agent is on the latest version.
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
@AdzerKI: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.
/kind feature/kind enhancement/kind refactoring/kind bug/kind packaging
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
/kind bug