entrypoint.sh 399 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. # set odoo database host, port, user and password
  4. : ${PGHOST:=$DB_PORT_5432_TCP_ADDR}
  5. : ${PGPORT:=$DB_PORT_5432_TCP_PORT}
  6. : ${PGUSER:=${DB_ENV_POSTGRES_USER:='postgres'}}
  7. : ${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD}
  8. export PGHOST PGPORT PGUSER PGPASSWORD
  9. case "$1" in
  10. --)
  11. shift
  12. exec openerp-server "$@"
  13. ;;
  14. -*)
  15. exec openerp-server "$@"
  16. ;;
  17. *)
  18. exec "$@"
  19. esac
  20. exit 1