Update entrypoint.sh

Fix the error wait-for-psql.py: the following arguments are required: --db_host, --db_port, --db_user, --db_password
in case we only set those variables (db_host,db_port,db_user,db_password) in odoo conf
This commit is contained in:
Jérémie Payet 2019-10-25 10:27:33 -10:00 committed by GitHub
parent ffe62bdd52
commit de41fd1d9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,8 +29,12 @@ case "$1" in
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
if [ ${#DB_ARGS[@]} -eq 0 ] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
fi
fi
;;
-*)