#!/bin/bash

CONF=/opt/odoo/openerp-web.cfg

# Configuration generation
echo "
[global]
# Configuration file auto-generated
server.environment = 'development'
server.socket_host = '0.0.0.0'
server.socket_port = ${WEB_PORT:=8080}
server.thread_pool = 10
tools.sessions.on = True
tools.sessions.persistent = False
server.profile_on = False
server.profile_dir = 'profile'
tools.encode.encoding='utf-8'
tools.proxy.on = ${PROXY_MODE:=True}
log.screen = False
log.access_file = '/opt/odoo/log/openerp-web/access.log'
log.error_file = '/opt/odoo/log/openerp-web/error.log'
log.access_level = 'INFO'
log.error_level = 'INFO'
tools.csrf.on = True
tools.log_tracebacks.on: False
tools.cgitb.on: True
tools.cgitb.ignore=(
    openobject.errors.Concurrency,
    openobject.errors.TinyException)
openerp.server.host = '${OPENERP_HOST:=openerp}'
openerp.server.port = '${OPENERP_PORT:=8070}'
openerp.server.protocol = '${OPENERP_PROTOCOL:=socket}'
openerp.server.timeout = 900

[openerp-web]
dblist.filter = 'NONE'
dbbutton.visible = True
company.url = ''" > $CONF
