Always create the baseonly database
Users prefer this.
This commit is contained in:
parent
8c90401622
commit
0673e1bab1
1 changed files with 9 additions and 9 deletions
|
|
@ -16,6 +16,14 @@ dropdb --if-exists ${PGDATABASE}-baseonly
|
||||||
|
|
||||||
ADDONS=$(manifestoo --select-addons-dir ${ADDONS_DIR} --select-include "${INCLUDE}" --select-exclude "${EXCLUDE}" list --separator=,)
|
ADDONS=$(manifestoo --select-addons-dir ${ADDONS_DIR} --select-include "${INCLUDE}" --select-exclude "${EXCLUDE}" list --separator=,)
|
||||||
|
|
||||||
|
# Create the baseonly database if installation failed.
|
||||||
|
unbuffer $(which odoo || which openerp-server) \
|
||||||
|
--data-dir=/mnt/data/odoo-data-dir \
|
||||||
|
--db-template=template1 \
|
||||||
|
-d ${PGDATABASE}-baseonly \
|
||||||
|
-i base \
|
||||||
|
--stop-after-init
|
||||||
|
|
||||||
# Try to install all addons, but do not fail in case of error, to let the build start
|
# Try to install all addons, but do not fail in case of error, to let the build start
|
||||||
# so users can work with the 'baseonly' database.
|
# so users can work with the 'baseonly' database.
|
||||||
unbuffer $(which odoo || which openerp-server) \
|
unbuffer $(which odoo || which openerp-server) \
|
||||||
|
|
@ -23,12 +31,4 @@ unbuffer $(which odoo || which openerp-server) \
|
||||||
--db-template=template1 \
|
--db-template=template1 \
|
||||||
-d ${PGDATABASE} \
|
-d ${PGDATABASE} \
|
||||||
-i ${ADDONS:-base} \
|
-i ${ADDONS:-base} \
|
||||||
--stop-after-init || \
|
--stop-after-init || dropdb --if-exists ${PGDATABASE} && exit 0
|
||||||
# Create the baseonly database if installation failed.
|
|
||||||
(dropdb --if-exists ${PGDATABASE} && \
|
|
||||||
unbuffer $(which odoo || which openerp-server) \
|
|
||||||
--data-dir=/mnt/data/odoo-data-dir \
|
|
||||||
--db-template=template1 \
|
|
||||||
-d ${PGDATABASE}-baseonly \
|
|
||||||
-i base \
|
|
||||||
--stop-after-init)
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue