32 lines
1.2 KiB
Bash
32 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
if [ -s /etc/trytond_populate.conf ]; then
|
|
if [ "$DEVELOP" == "True" ]; then
|
|
if [ "$WORKER" == "True" ]; then
|
|
trytond -c /etc/trytond.conf --dev --logconf /etc/trytond_logging.conf &
|
|
trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf &
|
|
trytond-worker -c /etc/trytond.conf --dev --logconf /etc/trytond_worker_logging.conf
|
|
else
|
|
trytond -c /etc/trytond.conf --dev --logconf /etc/trytond_logging.conf &
|
|
trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf
|
|
fi
|
|
elif [ "$WORKER" == "True" ]; then
|
|
trytond-cron -c /etc/trytond.conf --dev --logconf /etc/trytond_cron_logging.conf &
|
|
trytond-worker -c /etc/trytond.conf --dev --logconf /etc/trytond_worker_logging.conf &
|
|
uwsgi --ini /etc/uwsgi.conf
|
|
else
|
|
uwsgi --ini /etc/uwsgi.conf
|
|
fi
|
|
else
|
|
sleep $SLEEP_TRYTOND_ADMIN &&
|
|
echo $TRYTONADMINPASS > $TRYTONPASSFILE
|
|
if [ "$Provider" == "Kalenis" ]; then
|
|
trytond-admin -c /etc/trytond.conf -d $POSTGRES_DB --all --email $EMAIL -u user_view -vv
|
|
else
|
|
trytond-admin -c /etc/trytond.conf -d $POSTGRES_DB --all --email $EMAIL -vv
|
|
fi
|
|
echo "1" > /etc/trytond_populate.conf &&
|
|
/bin/bash /opt/start.sh
|
|
fi
|
|
|
|
|