Skip to content

fully flexible config override with variables #21

@eleaner

Description

@eleaner

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions