oc_template/.dev/run.sh

32 lines
587 B
Bash
Raw Normal View History

2024-06-15 11:00:00 -05:00
#!/bin/bash
# script para iniciar entorno vivo
SCRIPT_DIR=$(dirname `realpath $0`)
die() {
echo $1
exit 1
}
[ ! -d "$SRC" ] && die "no se ubica ruta en SRC"
[ -z "$DB_NAME" ] && die "se requiere variable DB_NAME"
set -e
# instalar modulo
source ${SCRIPT_DIR}/install_module.sh
# inicializar base de datos
# https://docs.tryton.org/projects/server/en/latest/tutorial/module/setup_database.html
yes admin | trytond-admin -d ${DB_NAME} --all --act
# ejecutar servidor
export SCRIPT_DIR
export MODULES=$module_names
export DB_NAME
export SRC
honcho -d ${SCRIPT_DIR} start