#!/bin/bash

CONF=/opt/odoo/odoo.conf
ODOOCMD="python OCB/odoo-bin --config $CONF"

if [ $LOAD ]; then
  ODOOCMD="$ODOOCMD --load=$LOAD"
fi

if [ "$DEV" == 1 ]; then
  ODOOCMD="$ODOOCMD --dev all --log-handler :DEBUG"
fi

# Configuration generation and Odoo launch
bash genconf.sh && $ODOOCMD
