From ed53a1e73a3eac81dc9cfd45a79063705bffc81a Mon Sep 17 00:00:00 2001 From: Josh Santos Date: Mon, 1 Apr 2024 08:06:37 -0400 Subject: [PATCH] db_password is required for Odoo to start --- 15.0/entrypoint.sh | 9 ++++++--- 16.0/entrypoint.sh | 9 ++++++--- 17.0/entrypoint.sh | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/15.0/entrypoint.sh b/15.0/entrypoint.sh index 91e41a1..c0708bd 100755 --- a/15.0/entrypoint.sh +++ b/15.0/entrypoint.sh @@ -29,15 +29,18 @@ function check_config() { ODOO_ARGS+=("--${param}") ODOO_ARGS+=("${value}") - DB_ARGS+=("${pg_flag}") - DB_ARGS+=("${value}") + # Only add to DB_ARGS if pg_flag is set + if [[ -n "$pg_flag" ]]; then + DB_ARGS+=("${pg_flag}") + DB_ARGS+=("${value}") + fi } check_config "db_name" "$NAME" "-d" check_config "db_host" "$HOST" "-h" check_config "db_port" "$PORT" "-p" check_config "db_user" "$USER" "-U" -# check_config "db_password" "$PASSWORD" +check_config "db_password" "$PASSWORD" case "$1" in -- | odoo) diff --git a/16.0/entrypoint.sh b/16.0/entrypoint.sh index 91e41a1..c0708bd 100755 --- a/16.0/entrypoint.sh +++ b/16.0/entrypoint.sh @@ -29,15 +29,18 @@ function check_config() { ODOO_ARGS+=("--${param}") ODOO_ARGS+=("${value}") - DB_ARGS+=("${pg_flag}") - DB_ARGS+=("${value}") + # Only add to DB_ARGS if pg_flag is set + if [[ -n "$pg_flag" ]]; then + DB_ARGS+=("${pg_flag}") + DB_ARGS+=("${value}") + fi } check_config "db_name" "$NAME" "-d" check_config "db_host" "$HOST" "-h" check_config "db_port" "$PORT" "-p" check_config "db_user" "$USER" "-U" -# check_config "db_password" "$PASSWORD" +check_config "db_password" "$PASSWORD" case "$1" in -- | odoo) diff --git a/17.0/entrypoint.sh b/17.0/entrypoint.sh index 91e41a1..c0708bd 100755 --- a/17.0/entrypoint.sh +++ b/17.0/entrypoint.sh @@ -29,15 +29,18 @@ function check_config() { ODOO_ARGS+=("--${param}") ODOO_ARGS+=("${value}") - DB_ARGS+=("${pg_flag}") - DB_ARGS+=("${value}") + # Only add to DB_ARGS if pg_flag is set + if [[ -n "$pg_flag" ]]; then + DB_ARGS+=("${pg_flag}") + DB_ARGS+=("${value}") + fi } check_config "db_name" "$NAME" "-d" check_config "db_host" "$HOST" "-h" check_config "db_port" "$PORT" "-p" check_config "db_user" "$USER" "-U" -# check_config "db_password" "$PASSWORD" +check_config "db_password" "$PASSWORD" case "$1" in -- | odoo)