In order to use OAuth I understand one must go to single database mode
.
There seem to be only two ways to do it. The third way I was expecting seem to be broken:
- As indicated in
General Settings
-- "The public portal is accessible only if you are in a single database mode. You can launch the OpenERP Server with the option--db-filter=DATABASENAME
to do so. " - Specifying the database target in the URL --
http://subdomain.mydomain.com:8069/?db=DATABASENAME
- Specifying the database target in
openerp-server.conf
withdbfilter = DATABASENAME
I've tried dbfilter =
, db_filter =
and db-filter =
in my openerp-server.conf
, but none seem to work.
My circumstances:
- I'm running on Ubuntu 12.04 LTS
- My server start command is
sudo service openerp-server start
my script contains :
# Specify an alternate config file (Default: /etc/openerp-server.conf). CONFIGFILE="/etc/openerp-server.conf" # Additional options that are passed to the Daemon. DAEMON_OPTS="-c $CONFIGFILE" # case "${1}" in start) echo -n "Starting ${DESC}: " start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ --chuid ${USER} --background --make-pidfile \ --exec ${DAEMON} -- ${DAEMON_OPTS}
I've tried altering the start command to this . . .
start-stop-daemon --start --db-filter=DATABASENAME --quiet
. . . but that just gets me this . . .
Starting openerp-server: start-stop-daemon: unrecognized option '--db-filter=DATABASENAME'
Evidently the start-stop-daemon expects something different.
Can anyone tell me the right way to do this?
Where can I find the script for the start-stop-daemon?
Well at least [openerp-server --help | grep filter] prints [--db-filter=REGEXP Filter listed database]. So there should be an option called --db-filter.
Yes. That is the 1st method that I mention. It works as long as you run openerp as an application rather than a service.
Great question, Martin. If you're using the Ubuntu packages and editing the init script (Lorenzo's answer) then package upgrades most likely overwrite your change in DAEMON_OPTS. How Do you deal with that?
Also, did you find a way to do this in the configuration file, please? That would be preferred over editing the init script due to the overwriting issue.
I did not go that far with it. Probably the thing to do is make a patch file from the original vs the altered script and keep it around for your upgrades. I suppose I should have done that and submitted it to the bug police. (So much to do, huh)
Anyway, it seems fixed to me: https://bugs.launchpad.net/openobject-server/+bug/940439