diff --git a/helpers/entrypoint.sh b/helpers/entrypoint.sh index 7964b4b06..7b15d1243 100644 --- a/helpers/entrypoint.sh +++ b/helpers/entrypoint.sh @@ -61,7 +61,8 @@ if [ "$SWARM_MODE" != "yes" ] && [ "$KUBERNETES_MODE" != "yes" ] && [ "$AUTOCONF fi target="${target}${name}.conf" log "ENTRYPOINT" "ℹ️" "Saving custom config to $target ..." - echo "${!var_name}" > "$target" + content=$(python3 -c "import os ; print(os.environ['${var_name}'])") + echo "${content}" > "$target" done # execute temp nginx with no server diff --git a/helpers/utils.sh b/helpers/utils.sh index ee4784fd0..1a421eab0 100644 --- a/helpers/utils.sh +++ b/helpers/utils.sh @@ -56,7 +56,8 @@ function get_env() { for var_name in $(python3 -c 'import os ; [print(k) for k in os.environ]') ; do filter=$(echo -n "$var_name" | sed -r 's/^(HOSTNAME|PWD|PKG_RELEASE|NJS_VERSION|SHLVL|PATH|_|NGINX_VERSION|HOME|([a-z\.\-]*)_?CUSTOM_CONF_(HTTP|DEFAULT_SERVER_HTTP|SERVER_HTTP|MODSEC|MODSEC_CRS)_(.*))$//g') if [ "$filter" != "" ] ; then - echo "${var_name}=${!var_name}" + var_value=$(python3 -c "import os ; print(os.environ['${var_name}'])") + echo "${var_name}=${var_value}" fi done } \ No newline at end of file