Skip to content

Updates config.txt#7

Open
jakimowb wants to merge 2 commits into
davidfrantz:mainfrom
HU-EOLab:lux_upstream
Open

Updates config.txt#7
jakimowb wants to merge 2 commits into
davidfrantz:mainfrom
HU-EOLab:lux_upstream

Conversation

@jakimowb
Copy link
Copy Markdown

@jakimowb jakimowb commented Dec 18, 2025

This PR enhances read-config.sh to allow for reading of optional parameters and adds support for 3 new optional parameters in the config.txt

  1. read-config.sh can be called like
# syntax: read-config.sh PARAMETER_NAME config.txt [DEFAULT_VALUE]
read-config.sh "MY_PARAMETER" $PATH_CONFIG_FILE "default_value"

If my MY_PARAMETER does not exist, the default value will be used. This allows to define
optional config settings, as in the following:

  1. USER_GROUP allows to overwrite the default user and group id that is returned by "$(id -u):$(id -g)", e.g. in
docker run \
--rm \
...
-u "$(id -u):$(id -g)" \
"$IMAGE" \
force-level1-csd \

This allows to create files with user rights different to the UID and GID of the user that started the bash script & docker process. For example, my "standard" uid and gui are: uid=7001(jakimowb) gid=9000(eolab).
Adding USER_GROUP = 7001:9003 to the config.txt ensures that FORCE creates files with uid=7001(jakimowb), gid=9003(datacube), so that all datacube users have access to.

  1. WVP_START

Allows to overwrite the d paramter in update-wvdb.sh, i.e. the start date to download WV data for

  1. DIR_CREDENTIALS

By default, many bash scripts assume that the credentials are located in $HOME

docker run \
--rm \
...
-v "$HOME:/app/credentials" \
...
"$IMAGE" \
force-level1-csd \

DIR_CREDENTIALS allows to overwrite this default location, e.g.
DIR_CREDENTIALS = /home/myuseraccount/.credentials

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

Successfully merging this pull request may close these issues.

1 participant