From cc1ea7fa25b2b6e35f4b648713e3a120deddfdf3 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 11 Apr 2020 16:54:57 +0200 Subject: [PATCH] Add Odoo 10 to graveyard (cherry-picked from 2018-11-17) --- extra/graveyard/odoo10/install.sh | 41 +++++++++++++++ extra/graveyard/odoo10/install/adminpwd.sql | 3 ++ extra/graveyard/odoo10/install/createdb.sql | 4 ++ .../odoo10/install/etc/init.d/odoo10 | 23 +++++++++ .../odoo10/install/srv/odoo10/conf/odoo.conf | 11 ++++ .../odoo10/install/srv/odoo10/update-conf.sh | 3 ++ extra/graveyard/odoo10/lxcfile | 51 +++++++++++++++++++ extra/graveyard/odoo10/pkg | 7 +++ extra/graveyard/odoo10/uninstall.sh | 13 +++++ 9 files changed, 156 insertions(+) create mode 100644 extra/graveyard/odoo10/install.sh create mode 100644 extra/graveyard/odoo10/install/adminpwd.sql create mode 100644 extra/graveyard/odoo10/install/createdb.sql create mode 100644 extra/graveyard/odoo10/install/etc/init.d/odoo10 create mode 100644 extra/graveyard/odoo10/install/srv/odoo10/conf/odoo.conf create mode 100644 extra/graveyard/odoo10/install/srv/odoo10/update-conf.sh create mode 100644 extra/graveyard/odoo10/lxcfile create mode 100644 extra/graveyard/odoo10/pkg create mode 100644 extra/graveyard/odoo10/uninstall.sh diff --git a/extra/graveyard/odoo10/install.sh b/extra/graveyard/odoo10/install.sh new file mode 100644 index 0000000..81bdf0e --- /dev/null +++ b/extra/graveyard/odoo10/install.sh @@ -0,0 +1,41 @@ +#!/bin/sh +set -ev + +cd $(realpath $(dirname "${0}"))/install + +# Check prerequisites +[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 + +# Create databases +export ODOO_PWD=$(head -c 18 /dev/urandom | base64) +envsubst /srv/odoo10/conf/odoo.conf + +# Populate database +lxc-start odoo10 -- /srv/odoo/odoo-bin -c /srv/odoo/odoo.conf -i base --load-language=cs_CZ +until grep -q 'odoo.modules.loading: Modules loaded.' /var/log/lxc/odoo10.log; do + sleep 1 +done +lxc-stop odoo10 + +# Update admin account +export ODOO_ADMIN_HASH=$(lxc-execute odoo10 -- python -c "from passlib.hash import pbkdf2_sha512;print pbkdf2_sha512.encrypt('${ODOO_ADMIN_PWD}')") +envsubst