2014-12-10 06:20:15 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-03-08 01:18:12 -05:00
|
|
|
set -e
|
|
|
|
|
2015-02-27 09:17:44 -05:00
|
|
|
# set odoo database host, port, user and password
|
2015-03-08 01:18:12 -05:00
|
|
|
: ${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
|
2014-12-10 06:20:15 -05:00
|
|
|
|
2015-03-17 12:45:37 -04:00
|
|
|
case "$1" in
|
2015-07-30 07:31:21 -04:00
|
|
|
--)
|
|
|
|
shift
|
|
|
|
exec gosu odoo openerp-server "$@"
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
exec gosu odoo openerp-server "$@"
|
|
|
|
;;
|
|
|
|
openerp-server)
|
|
|
|
exec gosu odoo "$@"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exec "$@"
|
2015-03-17 12:45:37 -04:00
|
|
|
esac
|
2015-02-27 08:41:23 -05:00
|
|
|
|
2015-03-17 12:45:37 -04:00
|
|
|
exit 1
|