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

fully flexible config override with variables #21

Open
eleaner opened this issue Jan 20, 2024 · 0 comments
Open

fully flexible config override with variables #21

eleaner opened this issue Jan 20, 2024 · 0 comments

Comments

@eleaner
Copy link

eleaner commented Jan 20, 2024

I see you are very selective in defining as to which config parameters are to be modified through ENV variables.

I wonder why wouldn't you go with something like:

configs=${!<respective config file>*}
for var in $configs; do
    config_name=${var#*_}
    echo "${config_name} = ${!var}" >> /etc/mfs/<respecitve config file>.cfg
done

then e.g. ENV

mfschunkserver_WORKING_GROUP = mfs

would set
WORKING_GROUP = mfs
in /etc/mfs/mfschunkserver.cfg

(I am aware that the capital letters have to be addressed - I am only not sure how)

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

No branches or pull requests

1 participant