Files
NaliiaDev/start.sh
2026-01-16 15:27:07 -05:00

27 lines
1.1 KiB
Bash

#!/usr/bin/env sh
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 -d miac --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 -d miac --logconf /etc/trytond_worker_logging.conf &
gunicorn --config=/etc/gunicorn.conf.py
else
gunicorn --config=/etc/gunicorn.conf.py
fi
else
sleep $SLEEP_TRYTOND_ADMIN && echo $TRYTONADMINPASS > $TRYTONPASSFILE
trytond-admin -c /etc/trytond.conf -d $POSTGRES_DB --all --email $EMAIL -vv
echo "1" > /etc/trytond_populate.conf && /bin/bash /opt/start.sh
fi