From 438e6b7076df1daf5049d3cfa9f65b5c785cc4e4 Mon Sep 17 00:00:00 2001 From: Jeffery CHEN Fan Date: Mon, 30 Aug 2021 22:28:06 +0800 Subject: [PATCH] don't show db connction string in process list. --- 12.0/entrypoint.sh | 4 +++- 13.0/entrypoint.sh | 4 +++- 14.0/entrypoint.sh | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/12.0/entrypoint.sh b/12.0/entrypoint.sh index f802bcb..34099a8 100755 --- a/12.0/entrypoint.sh +++ b/12.0/entrypoint.sh @@ -19,6 +19,8 @@ function check_config() { value="$2" if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g') + else + echo "${param} = ${value} " >> $ODOO_RC fi; DB_ARGS+=("--${param}") DB_ARGS+=("${value}") @@ -35,7 +37,7 @@ case "$1" in exec odoo "$@" else wait-for-psql.py ${DB_ARGS[@]} --timeout=30 - exec odoo "$@" "${DB_ARGS[@]}" + exec odoo "$@" fi ;; -*) diff --git a/13.0/entrypoint.sh b/13.0/entrypoint.sh index f802bcb..34099a8 100755 --- a/13.0/entrypoint.sh +++ b/13.0/entrypoint.sh @@ -19,6 +19,8 @@ function check_config() { value="$2" if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g') + else + echo "${param} = ${value} " >> $ODOO_RC fi; DB_ARGS+=("--${param}") DB_ARGS+=("${value}") @@ -35,7 +37,7 @@ case "$1" in exec odoo "$@" else wait-for-psql.py ${DB_ARGS[@]} --timeout=30 - exec odoo "$@" "${DB_ARGS[@]}" + exec odoo "$@" fi ;; -*) diff --git a/14.0/entrypoint.sh b/14.0/entrypoint.sh index f802bcb..34099a8 100755 --- a/14.0/entrypoint.sh +++ b/14.0/entrypoint.sh @@ -19,6 +19,8 @@ function check_config() { value="$2" if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g') + else + echo "${param} = ${value} " >> $ODOO_RC fi; DB_ARGS+=("--${param}") DB_ARGS+=("${value}") @@ -35,7 +37,7 @@ case "$1" in exec odoo "$@" else wait-for-psql.py ${DB_ARGS[@]} --timeout=30 - exec odoo "$@" "${DB_ARGS[@]}" + exec odoo "$@" fi ;; -*)