moosefs-docker-cluster icon indicating copy to clipboard operation
moosefs-docker-cluster copied to clipboard

fully flexible config override with variables

Open eleaner opened this issue 1 year ago • 0 comments

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)

eleaner avatar Jan 20 '24 18:01 eleaner