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

Extend condition handling with support for simple config files #135

Open
troglobit opened this issue Sep 16, 2020 · 3 comments
Open

Extend condition handling with support for simple config files #135

troglobit opened this issue Sep 16, 2020 · 3 comments

Comments

@troglobit
Copy link
Owner

By design, the condition system in Finit currently does not support checking for plain files. The reason for this was mainly to avoid starting with the wrong version of a daemon config file. However, on simpler systems with more static setups, e.g., generic Linux distributions, it is common practise to look for the existence of /etc/daemon.conf before attempting to start a service.

To work around this "wrapper scripts" were invented, which also allow for sourcing files in /etc/default/demon and checking DAEMON_ENABLED environment variable and similar.

@troglobit
Copy link
Owner Author

Condition syntax proposal: <file/path/to/file>. For each ready service a new plugin has an inotify watcher for /path/to, which must be an absolute path.

@troglobit troglobit added this to the v4.0 milestone Feb 14, 2021
@troglobit troglobit assigned troglobit and unassigned troglobit Feb 15, 2021
@troglobit troglobit removed this from the v4.0 milestone Feb 28, 2021
@troglobit
Copy link
Owner Author

This was dropped from the 4.0 milestone because of its inherent complexity. Unlike the pidfile plugin, which has a root for the files it monitors, the file plugin would have no base but have to closely follow run/task/services that declare a <file/*> condition.

For many use-cases the new env: support will hopefully be sufficient. Anyone else is of course welcome to pick this one up and submit a pull-request! Just make sure to discuss the design (here) with us first :-)

@troglobit
Copy link
Owner Author

For a deeper discussion and a possible way forward, see #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant