From efa4466d84763f838d5b8eb9410c5d23fc73331a Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Thu, 30 May 2024 15:47:11 -0500 Subject: [PATCH] Allow providing a (json) list of trusted cidrs to write to the config --- docker-entrypoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index df69b82..02ed206 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -219,6 +219,14 @@ if [[ -n ${full_node_peer} ]]; then ' "$CHIA_ROOT/config/config.yaml" fi +if [[ -n ${trusted_cidrs} ]]; then + echo "Changing trusted cidr setting in config.yaml to value: $trusted_cidrs" + yq -i ' + .wallet.trusted_cidrs = env(trusted_cidrs) | + .full_node.trusted_cidrs = env(trusted_cidrs) + ' "$CHIA_ROOT/config/config.yaml" +fi + if [[ ${log_to_file} != 'true' ]]; then sed -i 's/log_stdout: false/log_stdout: true/g' "$CHIA_ROOT/config/config.yaml" else