docker-odoo/8.0/entrypoint.sh
Colin Newell 6547b0d188 Add support for gosu to allow for root access.
Additionally deal with case of user specifiying openerp-server as part
of the command line to run.
2015-07-30 16:16:39 +01:00

28 lines
467 B
Bash
Executable File

#!/bin/bash
set -e
# set odoo database host, port, user and password
: ${PGHOST:=$DB_PORT_5432_TCP_ADDR}
: ${PGPORT:=$DB_PORT_5432_TCP_PORT}
: ${PGUSER:=${DB_ENV_POSTGRES_USER:='postgres'}}
: ${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD}
export PGHOST PGPORT PGUSER PGPASSWORD
case "$1" in
--)
shift
exec gosu odoo openerp-server "$@"
;;
-*)
exec gosu odoo openerp-server "$@"
;;
openerp-server)
exec gosu odoo "$@"
;;
*)
exec "$@"
esac
exit 1