moosefs-docker-cluster
moosefs-docker-cluster copied to clipboard
fully flexible config override with variables
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)