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-09-11 10:09:42 -04:00
|
|
|
: ${PGHOST:=${RDS_HOSTNAME:=${PGHOST:=${DB_PORT_5432_TCP_ADDR:='localhost'}}}}
|
|
|
|
: ${PGPORT:=${RDS_PORT:=${PGPORT:=${DB_PORT_5432_TCP_PORT:=5432}}}}
|
|
|
|
: ${PGUSER:=${RDS_USERNAME:=${PGUSER:=${DB_ENV_POSTGRES_USER:='postgres'}}}}
|
|
|
|
: ${PGPASSWORD:=${RDS_PASSWORD:=${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD}}}
|
2015-03-08 01:18:12 -05:00
|
|
|
export PGHOST PGPORT PGUSER PGPASSWORD
|
2014-12-10 06:20:15 -05:00
|
|
|
|
2015-03-17 12:45:37 -04:00
|
|
|
case "$1" in
|
|
|
|
--)
|
|
|
|
shift
|
2015-03-17 13:04:55 -04:00
|
|
|
exec openerp-server "$@"
|
2015-03-17 12:45:37 -04:00
|
|
|
;;
|
|
|
|
-*)
|
2015-03-17 13:04:55 -04:00
|
|
|
exec openerp-server "$@"
|
2015-03-17 12:45:37 -04:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exec "$@"
|
|
|
|
esac
|
2015-02-27 08:41:23 -05:00
|
|
|
|
2015-03-17 12:45:37 -04:00
|
|
|
exit 1
|