Fix Odoo setup when tty is attached

This commit is contained in:
Disassembler 2020-04-05 20:38:07 +02:00
parent 1a0c641df3
commit 5f6a7a2517
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
2 changed files with 3 additions and 4 deletions

@ -1 +1 @@
Subproject commit 5929a1ea6b9e551965fde57e4e83b41d05b901c4 Subproject commit b3f2a4be70309c51a3a119cc32bd01ec1a08d2de

View File

@ -27,12 +27,11 @@ install -o 108080 -g 108080 -m 750 -d ${ODOO_DATA}
envsubst <odoo_conf/odoo.conf | install -o 108080 -g 108080 -m 640 /dev/stdin ${ODOO_CONF}/odoo.conf envsubst <odoo_conf/odoo.conf | install -o 108080 -g 108080 -m 640 /dev/stdin ${ODOO_CONF}/odoo.conf
# Populate database # Populate database
spoc-container exec odoo -- /srv/odoo/odoo-bin -c /srv/odoo/odoo.conf -i base --load-language=cs_CZ & spoc-container start odoo -- /srv/odoo/odoo-bin -c /srv/odoo/odoo.conf -i base --load-language=cs_CZ
ODOO_PID=$!
until grep -q 'odoo.modules.loading: Modules loaded.' /var/log/spoc/odoo.log; do until grep -q 'odoo.modules.loading: Modules loaded.' /var/log/spoc/odoo.log; do
sleep 1 sleep 1
done done
kill ${ODOO_PID} spoc-container stop odoo
# Update admin account # Update admin account
export ODOO_ADMIN_HASH=$(spoc-container exec odoo -- python -c "from passlib.hash import pbkdf2_sha512;print(pbkdf2_sha512.hash('${ODOO_ADMIN_PWD}'))") export ODOO_ADMIN_HASH=$(spoc-container exec odoo -- python -c "from passlib.hash import pbkdf2_sha512;print(pbkdf2_sha512.hash('${ODOO_ADMIN_PWD}'))")