Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service files use ConditionPathExists and ConditionFileNotEmpty instead of Assertion #1521

Open
sents opened this issue Dec 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sents
Copy link

sents commented Dec 22, 2024

The service files provided in scripts/pkg/linux/cnspec.service and scripts/pkg/debian/cnspec.service,
use ConditionPathExists=/etc/opt/mondoo/ and ConditionFileNotEmpty=/etc/opt/mondoo/mondoo.yml.

This will silently skip the unit as if it were not applicable to the system and will not cause the unit to fail.
Is this the intended behavior?

The systemd documentation suggests Condition checks for skipping inapplicable
units and Assert checks for failing prerequisites. It seems to me that an assertion better fits the scenario
of cnspec not having access to a working directory or a configuration.

@chris-rock chris-rock added the enhancement New feature or request label Feb 10, 2025
@chris-rock
Copy link
Member

I like the idea to improve the systemd configuration.

@benr benr self-assigned this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants