Files
intelmq-docker/.docker/intelmq-full-dev/entrypoint-dev.sh
Kamil Mankowski a597fec2a9 Update to IntelMQ 3.2
Move from nosetests to pytest. Move from hug to FastAPI
2023-07-25 16:01:46 +02:00

32 lines
658 B
Bash

#!/bin/bash
export INTELMQ_IS_DOCKER=1
if [[ ${IS_DEV} == "true" ]]
then
/opt/install_reqs_and_deploy_bots.sh
fi
sudo chown -R intelmq:intelmq /etc/intelmq
sudo chown -R intelmq:intelmq /opt/intelmq
intelmqctl upgrade-config
intelmqctl check
intelmq_user="${INTELMQ_API_USER:=intelmq}"
intelmq_pass="${INTELMQ_API_PASS:=intelmq}"
intelmq-api-adduser --user "$intelmq_user" --password "$intelmq_pass"
if [[ ${ENABLE_BOTNET_AT_BOOT} == "true" ]]; then
intelmqctl start
fi
if [[ $1 == "selftest" ]]
then
export INTELMQ_TEST_EXOTIC=1
pytest-3 /etc/intelmq/intelmq/tests
else
cd /etc/intelmq-api && uvicorn intelmq_api.main:app -p8080
fi