diff --git a/docker/devicehub-django.entrypoint.sh b/docker/devicehub-django.entrypoint.sh index b6ea0ed..3ab4c09 100644 --- a/docker/devicehub-django.entrypoint.sh +++ b/docker/devicehub-django.entrypoint.sh @@ -126,6 +126,11 @@ config_phase() { init_flagfile='/already_configured' if [ ! -f "${init_flagfile}" ]; then + # non DL user (only for the inventory) + ./manage.py add_institution "${INIT_ORG}" + # TODO: one error on add_user, and you don't add user anymore + ./manage.py add_user "${INIT_ORG}" "${INIT_USER}" "${INIT_PASSWD}" "${ADMIN}" "${PREDEFINED_TOKEN}" + if [ "${DPP_MODULE}" = 'y' ]; then # 12, 13, 14 config_dpp_part1 @@ -135,11 +140,6 @@ config_phase() { cp example/dpp-snapshots/*.json example/snapshots/ fi - # non DL user (only for the inventory) - ./manage.py add_institution "${INIT_ORG}" - # TODO: one error on add_user, and you don't add user anymore - ./manage.py add_user "${INIT_ORG}" "${INIT_USER}" "${INIT_PASSWD}" "${ADMIN}" "${PREDEFINED_TOKEN}" - # # 15. Add inventory snapshots for user "${INIT_USER}". if [ "${DEMO:-}" = 'true' ]; then /usr/bin/time ./manage.py up_snapshots "${INIT_USER}"