-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Feature request, Multiple env files for a single service #183
Comments
Anything's possible, but I have no need for this myself, and it would require quite a lot of work to change current data structures and inotify watchers to handle. I'm saving this but putting it on milestone future. Maybe someone else wants it too and can do the leg work. |
Thanks for considering. In the meantime, I'll source env1 in finit.conf then call a script which first sources a subsequent env file, then exec the app. I think it can be a reasonable workaround. |
As another simple idea, could we have a |
The problem is that the env files are considered part of the configuration of that service, so when either the env file or the .conf file changes, Finit registers this and knows which services to restart/SIGHUP when it receives |
I think this can actually work already when #248 is implemented. if an additional env file is required (such as in my case) it can be sourced in the pre script. |
True, thanks for following-up on this! |
Hi there,
I'm building a system which has env files for each service stored in
/etc/default/<service>
I would like to allow users to override variables using a read-write directory, so for example something like
/mnt/flash/etc/default/<service>
So, I would like to be able to read multiple env files. For example:
env:-/etc/default/foo,/mnt/flash/etc/default/foo
This way, we require that /etc/default/foo exists and this provides our hardcoded variables. However, after reading that, /mnt/flash/etc/default/foo is read and if the variable has the same name.... e.g. FOO_OPTIONS then it would just overwrite as the variable files would be read in order of left to right.
This means the user can optionally create a /mnt/flash/etc/default/foo file and overwrite some (or all) of the variables. I was thinking we could have the same format, so this would also be valid if we wanted it to error if flash env doesn't exist:
env:-/etc/default/foo,-/mnt/flash/etc/default/foo
Would it be possible to add this feature? The only way right now I think to do this is to use a script to call my service which is less than ideal.
The text was updated successfully, but these errors were encountered: